diff --git a/operations/update-version.sh b/operations/update-version.sh index a6907d2..166b55d 100755 --- a/operations/update-version.sh +++ b/operations/update-version.sh @@ -37,13 +37,19 @@ jq ".version = \"${newVersion}\"" web/package.json > temp.json printf "mv temp.json web/package.json\n" mv temp.json web/package.json +printf ">> Updating /web/package-lock.json with \"version\": \"%s\"\n" "$newVersion" +printf "jq \".version = \\\"%s\\\"\" web/package-lock.json > temp.json\n" "$newVersion" +jq ".version = \"${newVersion}\"" web/package-lock.json > temp.json +printf "mv temp.json web/package-lock.json\n" +mv temp.json web/package-lock.json + printf ">> Updating /api/src/main/nim/personal_measure_apipkg/version.nim with PM_API_VERSION* = \"%s\"" "$newVersion" printf "sed -i \"s/%s/%s/\" api/src/main/nim/personal_measure_apipkg/version.nim" "$lastVersion" "$newVersion" sed -i "s/${lastVersion}/${newVersion}/" api/src/main/nim/personal_measure_apipkg/version.nim printf ">> Committing new version.\n" -printf "git add web/package.json api/src/main/nim/personal_measure_apipkg/version.nim" -git add web/package.json api/src/main/nim/personal_measure_apipkg/version.nim +printf "git add web/package.json web/package-lock.json api/src/main/nim/personal_measure_apipkg/version.nim" +git add web/package.json web/package-lock.json api/src/main/nim/personal_measure_apipkg/version.nim printf "git commit -m \"Update package version to %s\"\n" "$newVersion" git commit -m "Update package version to ${newVersion}"