Skip to content

Commit d560261

Browse files
committed
improve release script
1 parent 8728c3c commit d560261

File tree

2 files changed

+197
-2
lines changed

2 files changed

+197
-2
lines changed

package-lock.json

Lines changed: 187 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@
2121
"fmt": "prettier --write . && eslint . --fix --ignore-pattern dist/",
2222
"lint": "prettier --check . && eslint . --ignore-pattern dist/",
2323
"test": "npm run lint && vitest run",
24-
"release": "npm run lint && npm run build && npm publish",
2524
"upgrade": "npx npm-check-updates -u && npm install",
26-
"prepare": "husky"
25+
"prepare": "husky",
26+
"release": "version=v$(npm pkg get version | tr -d \\\") && echo $version && npm run lint && npm run build && npm publish && git tag -a $version -m \"$version\" && git push origin v$version",
27+
"autorelease": "echo $version && sed -i \"s/^\\\"version\\\": \\\"[0-9]*\\.[0-9]*\\.[0-9]*\\\"\\$/\\\"version\\\": \\\"$version\\\"/\" \"package.json\"",
28+
"changelog": "auto-changelog -p && git add CHANGELOG.md"
2729
},
2830
"dependencies": {
2931
"@zazuko/yasgui": "^4.3.3",
@@ -40,6 +42,7 @@
4042
"@types/eslint__js": "^8.42.3",
4143
"@types/node": "^22.7.0",
4244
"@types/sparqljs": "^3.1.11",
45+
"auto-changelog": "^2.5.0",
4346
"eslint": "^9.11.1",
4447
"husky": "^9.1.6",
4548
"jsdom": "^25.0.1",
@@ -66,6 +69,11 @@
6669
"eslint --fix"
6770
]
6871
},
72+
"auto-changelog": {
73+
"template": "keepachangelog",
74+
"unreleased": true,
75+
"commitLimit": false
76+
},
6977
"keywords": [
7078
"SPARQL",
7179
"editor",

0 commit comments

Comments
 (0)