Skip to content

Commit

Permalink
Fix bump_version.sh to commit, clean-up after desktop app version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
debanjum committed Dec 22, 2023
1 parent 6a8c1fe commit e42111a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/bump_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ do
# Bump Desktop app to current version
cd $project_root/src/interface/desktop
sed -E -i.bak "s/version\": \"(.*)\",/version\": \"$current_version\",/" package.json
rm *.bak

# Bump Obsidian plugin to current version
cd $project_root/src/interface/obsidian
Expand All @@ -37,6 +38,7 @@ do

# Commit changes and tag commit for release
git add \
$project_root/src/interface/desktop/package.json \
$project_root/src/interface/obsidian/package.json \
$project_root/src/interface/obsidian/manifest.json \
$project_root/src/interface/obsidian/versions.json \
Expand All @@ -52,6 +54,11 @@ do
next_version=$(touch bump.txt && git add bump.txt && hatch version | sed 's/\.dev.*//g')
git rm --cached -- bump.txt && rm bump.txt

# Bump Desktop app to next version
cd $project_root/src/interface/desktop
sed -E -i.bak "s/version\": \"(.*)\",/version\": \"$current_version\",/" package.json
rm *.bak

# Bump Obsidian plugins to next version
cd $project_root/src/interface/obsidian
sed -E -i.bak "s/version\": \"(.*)\",/version\": \"$next_version\",/" package.json
Expand All @@ -69,6 +76,7 @@ do

# Commit changes
git add \
$project_root/src/interface/desktop/package.json \
$project_root/src/interface/obsidian/package.json \
$project_root/src/interface/obsidian/manifest.json \
$project_root/src/interface/obsidian/versions.json \
Expand Down

0 comments on commit e42111a

Please sign in to comment.