-
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
Ji Sang Seo
committed
Feb 17, 2024
1 parent
f050a5d
commit 6e16df1
Showing
4 changed files
with
36 additions
and
77 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 |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
{ | ||
"type": "chore", | ||
"section": "Others", | ||
"hidden": false | ||
"hidden": true | ||
}, | ||
{ | ||
"type": "revert", | ||
|
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
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,34 @@ | ||
import { execSync } from "child_process"; | ||
import chalk from "chalk"; | ||
|
||
const RELEASE_CREDENTIAL_BRANCH = "main"; | ||
|
||
function validation() { | ||
const result = { | ||
success: true, | ||
msg: "", | ||
}; | ||
//1. should be main branch | ||
const currentBranchName = execSync(`git branch --show-current`, { | ||
encoding: "utf8", | ||
}).trim(); | ||
if (currentBranchName !== RELEASE_CREDENTIAL_BRANCH) { | ||
result.success = false; | ||
result.msg = "current branch is not allowed to release"; | ||
} | ||
|
||
return result; | ||
} | ||
|
||
async function exec() { | ||
const res = validation(); | ||
|
||
if (!res.success) { | ||
throw chalk.red(`Validation Error : ${res.msg}`); | ||
} | ||
|
||
execSync(`pnpm standard-version`); | ||
execSync(`git push --follow-tags`); | ||
} | ||
|
||
exec(); |
This file was deleted.
Oops, something went wrong.