Skip to content

Commit

Permalink
fix: create a version.ts file and use this for CLI version numbers (#390
Browse files Browse the repository at this point in the history
)
  • Loading branch information
geographika authored Jun 20, 2024
1 parent 2630c14 commit 5b4f47e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ jobs:
- name: Install dependencies ⏬
run: npm ci

- name: Build 🏗️
run: npm run build

- name: Release 🚀
uses: cycjimmy/[email protected]
id: semantic
Expand Down
8 changes: 7 additions & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,19 @@
}
}
],
[
"@semantic-release/exec",
{
"prepareCmd": "echo \"export default '${nextRelease.version}';\" > ./src/version.ts"
}
],
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md", "package.json", "package-lock.json"
"CHANGELOG.md", "package.json", "package-lock.json", "./src/version.ts"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"test": "node test.js",
"build-binaries": "npm run build && pkg package.json",
"package-binaries": "npm run build-binaries && node package-binaries.js",
"prepublishOnly": "npm run build",
"postpublish": "npm run package-binaries"
},
"pkg": {
Expand Down
2 changes: 1 addition & 1 deletion src/logHelper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import gradient from 'gradient-string';
import { version } from '../package.json';
import version from './version';

export const logTitle = () :void => {
console.log(gradient('#611E82', '#272C82', '#00943D', '#FFED00', '#F48E00', '#E7000E').multiline(`
Expand Down
1 change: 1 addition & 0 deletions src/version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default "3.1.4";

0 comments on commit 5b4f47e

Please sign in to comment.