Skip to content

Commit

Permalink
update build script and package-lock.json
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewwong525 committed Apr 21, 2024
1 parent 6f142fd commit f839006
Show file tree
Hide file tree
Showing 2 changed files with 218 additions and 4 deletions.
8 changes: 6 additions & 2 deletions bumpversion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ PROJECT_ROOT=$(git rev-parse --show-toplevel)

# Path to the manifest.json file
PACKAGEJSONPATH="$PROJECT_ROOT/package.json"
PACKAGELOCKPATH="$PROJECT_ROOT/package-lock.json"

# Check if manifest.json exists
if [ ! -f "$PACKAGEJSONPATH" ]; then
Expand All @@ -39,13 +40,16 @@ fi
# Update the version in manifest.json
sed -i '' 's|\(.*"version"\): "\(.*\)",.*|\1: '"\"$VERSION\",|" $PACKAGEJSONPATH

# Update package-lock.json
npm install

# Commit the changes (optional)
git add "$PACKAGEJSONPATH"
git add "$PACKAGEJSONPATH" "$PACKAGELOCKPATH"
git commit -m "Update version to $VERSION" $PACKAGEJSONPATH

# git push changes
git push
git tag $VERSION
git push origin refs/tags/$VERSION

echo "Version updated to $VERSION in manifest.json and ran build command"
echo "Version updated to $VERSION in package.json and ran build command"
214 changes: 212 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f839006

Please # to comment.