Skip to content

Commit

Permalink
Update script to usse npm to get pkg version
Browse files Browse the repository at this point in the history
  • Loading branch information
samirsilwal committed Mar 16, 2021
1 parent f1e9396 commit 6ac6175
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,13 @@ bump() {
}

compare_and_release() {
## Compare the package.json file from two recent commits to master branch and export
## Compare the package.json file from published package to master branch and export
## value to NEXT variable if it differs.

# Get the second last commit from the master branch after merge.
previous_commit_hash=$(git rev-parse @~)

git fetch --all
git checkout ${previous_commit_hash}

old_version=$(cat package.json | jq -r ".version")
old_version=$(npm show @leapfrogtechnology/sync-db version)

printfln "Old package version: ${old_version}"

git checkout master

new_version=$(cat package.json | jq -r ".version")

printfln "New package version: ${new_version}"
Expand Down

0 comments on commit 6ac6175

Please sign in to comment.