Skip to content

Commit

Permalink
Update release process
Browse files Browse the repository at this point in the history
  • Loading branch information
3y3 committed Apr 5, 2024
1 parent e5c065f commit 11c5a80
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions script/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,25 @@

set -e

VERSION=$1

export NODE_ENV=production

npm i @diplodoc/cli@latest --no-workspaces

VERSION=$(node -pe 'require("./package.json").dependencies["@diplodoc/cli"]')
CLI_VERSION=$(node -pe 'require("./package.json").dependencies["@diplodoc/cli"]')

if [[ -n "$(git status -s | grep package.json)" ]]; then
git add package.json package-lock.json
git commit -m "Update cli to version $CLI_VERSION"
git push
fi

if [[ -n "$(git status -s)" ]]; then
echo "Unable to release unstaged changes"
git status -s
exit 1
fi

git commit -am "Update cli to version $VERSION"
git tag v$VERSION
git push origin v$VERSION

0 comments on commit 11c5a80

Please sign in to comment.