Download native/system/scripts/commit-release.mjs from SaylorTwift/deepseek-harness: direct link, hf CLI and curl.
- Browser
- Download file 1.18 kB
-
https://huggingface.co/SaylorTwift/deepseek-harness/resolve/main/native/system/scripts/commit-release.mjs
- Command line
-
hf download hf://SaylorTwift/deepseek-harness/native/system/scripts/commit-release.mjs
-
curl -L -o commit-release.mjs https://huggingface.co/SaylorTwift/deepseek-harness/resolve/main/native/system/scripts/commit-release.mjs
1.18 kB
| /** | |
| * Bump, stage, and commit a release in one command: | |
| * `pnpm release:commit <major|minor|patch|x.y.z>`. The namespaced tag stays | |
| * manual — create it from the merged release commit. | |
| */ | |
| import path from 'node:path'; | |
| import { spawnSync } from 'node:child_process'; | |
| import { packageDirs, readJson, root } from './repo.mjs'; | |
| const bump = process.argv[2]; | |
| function run(command, args) { | |
| const result = spawnSync(command, args, { | |
| cwd: root, | |
| stdio: 'inherit', | |
| env: { ...process.env, CI: 'true' }, | |
| }); | |
| if (result.error) throw result.error; | |
| if (result.status !== 0) { | |
| process.exit(result.status ?? 1); | |
| } | |
| } | |
| if (!bump) { | |
| console.error('Usage: pnpm release:commit <major|minor|patch|x.y.z>'); | |
| process.exit(1); | |
| } | |
| run('node', ['./scripts/bump-release.mjs', bump]); | |
| const version = readJson(path.join(root, packageDirs()[0], 'package.json')).version; | |
| run('git', [ | |
| 'add', | |
| 'package.json', | |
| 'packages/*/package.json', | |
| '../../pnpm-lock.yaml', | |
| ]); | |
| run('git', ['commit', '-m', `release(node-addon-system): ${version}`]); | |
| console.log(`Committed release ${version}. Create the tag manually: git tag node-addon-system-v${version}`); | |