Skip to content

Commit

Permalink
Update version while deploying. (#17)
Browse files Browse the repository at this point in the history
* Update version while deploying.

* shorten version.
  • Loading branch information
tomusdrw authored Jan 2, 2025
1 parent 1ebb42d commit 7b0d0f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
run: npm ci
- name: Build
run: npm run build
- name: Update version
run: npm run update-version
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
Expand Down
2 changes: 1 addition & 1 deletion web/bump-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ const metadata = JSON.parse(fs.readFileSync(META_FILE));
const packageJson = JSON.parse(fs.readFileSync('./package.json'));
const hash = process.argv[2] || 'xxxxxx';

metadata.version = `${packageJson.version}-${hash}`;
metadata.version = `${packageJson.version}-${hash.substring(0, 6)}`;

fs.writeFileSync(META_FILE, JSON.stringify(metadata, null, 2));

0 comments on commit 7b0d0f1

Please sign in to comment.