-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc1792b
commit 84b1a90
Showing
3 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { execSync, log, parseOptions, runCommand } from '@stacksjs/cli' | ||
import { projectPath } from '@stacksjs/path' | ||
|
||
// when log.debug is used, only log to file in production | ||
log.debug('Generating changelog') | ||
const fromRevision = await execSync('git describe --abbrev=0 --tags HEAD^') | ||
log.debug('FromRevision', fromRevision) | ||
const toRevision = await execSync('git describe') | ||
log.debug('ToRevision', toRevision) | ||
const options = parseOptions() | ||
log.debug('Changelog Options', options) | ||
|
||
const command = options?.dryRun | ||
? `bunx changelogen --no-output --from ${fromRevision} --to ${toRevision}` | ||
: `bunx changelogen --output CHANGELOG.md --from ${fromRevision} --to ${toRevision}` | ||
|
||
await runCommand(command, { | ||
cwd: projectPath(), | ||
quiet: options?.quiet, | ||
verbose: options?.verbose, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "bun-plugin-env", | ||
"type": "module", | ||
"version": "0.1.2", | ||
"version": "0.1.1", | ||
"description": "", | ||
"author": "Chris Breuer <[email protected]>", | ||
"license": "MIT", | ||
|
@@ -43,12 +43,14 @@ | |
"commit": "git cz", | ||
"changelog": "bunx changelogen", | ||
"prepublishOnly": "bun --bun run build", | ||
"release": "bunx changelogen --release", | ||
"release": "bunx bumpp package.json --all && bun run changelog", | ||
"test": "bun test", | ||
"typecheck": "tsc --noEmit" | ||
}, | ||
"devDependencies": { | ||
"@stacksjs/cli": "^0.58.73", | ||
"@stacksjs/eslint-config": "^0.58.73", | ||
"@stacksjs/path": "^0.58.73", | ||
"@types/bun": "^1.0.6", | ||
"@types/node": "^20.11.19", | ||
"changelogen": "^0.5.5", | ||
|
@@ -71,4 +73,4 @@ | |
"path": "node_modules/cz-git" | ||
} | ||
} | ||
} | ||
} |