Skip to content

Commit

Permalink
🔧 Chore: update version automatic update script
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Aug 29, 2024
1 parent 64529c9 commit d0f2283
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion build/update-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import { dirname, join } from 'path'
import { fileURLToPath } from 'url'
import { execSync } from 'child_process';

// node build/update-version.js --stage [stage]
const branch = execSync('git rev-parse --abbrev-ref HEAD').toString().trim();
if (!['dev', 'master'].includes(branch)) {
// console.log(`The current branch is ${branch}, no need to update the FixIt version.`);
process.exit(0);
}
// node build/update-version.js --stage [version/commit]
const stage = process.argv[3] || 'commit';
const match = [
'archetypes/',
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/init/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- .Scratch.Set "version" "v0.3.10-ede47a2b" -}}
{{- .Scratch.Set "version" "v0.3.10-08d4c12c" -}}
{{- .Scratch.Set "this" dict -}}

{{- partial "init/detection-env.html" . -}}
Expand Down

0 comments on commit d0f2283

Please sign in to comment.