Skip to content

Commit

Permalink
fix: Fixed pre-release script (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles authored Nov 27, 2024
1 parent 6ec480b commit 1107e61
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vscode-deephaven",
"version": "0.1.14",
"version": "0.1.15",
"displayName": "Deephaven in VS Code",
"description": "",
"publisher": "deephaven",
Expand Down Expand Up @@ -35,7 +35,7 @@
"compile:prod": "npm run check:types && npm run test:lint && node scripts/esbuild.js --production",
"icon:gen": "node icons/generate.mjs",
"package:latest": "vsce package -o releases/vscode-deephaven-latest.vsix",
"publish:prerelease": "vsce publish --pre-release",
"publish:prerelease": "./scripts/publish-prerelease.sh",
"report:ctrfmerge": "ctrf merge e2e/reports --keep-reports --output-dir test-reports --output ctrf-report.json",
"report:ctrfsummary": "github-actions-ctrf test-reports/ctrf-report.json",
"report:junit2ctrf": "junit-to-ctrf test-reports/vitest.junit.xml --output test-reports/ctrf-report.json",
Expand Down
15 changes: 12 additions & 3 deletions scripts/publish-prerelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,20 @@ set -e
# Determine current npm version and calculate next patch version
current=$(node -p -e "require('./package.json').version")
next=$(npx semver $current -i patch)
tag="v$next-pre"

# Create a new branch, update the version, and create a new tag
git checkout -b v$next-pre
# Create a new branch
git checkout -b $tag

# Update version
npm version --git-tag-version=false $next
git tag $next-pre

# Commit and tag the new version
git add package.json
git add package-lock.json
git commit -m "$tag"
git push -u origin HEAD
git tag $tag
git push --tags

# Publish a pre-release version of the extension to the Marketplace
Expand Down

0 comments on commit 1107e61

Please sign in to comment.