-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add last commit info to banner
- Loading branch information
1 parent
ff2add0
commit 404023e
Showing
11 changed files
with
165 additions
and
7 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 |
---|---|---|
|
@@ -78,5 +78,8 @@ build/ | |
|
||
/lib/validation.py | ||
|
||
# Node packages | ||
node_modules | ||
|
||
#worktree | ||
/docs |
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,28 @@ | ||
const URL = "https://github.com/WuLiFang/Nuke"; | ||
|
||
/** | ||
* @type {import("standard-version").Options} | ||
* @link https://github.com/conventional-changelog/conventional-changelog-config-spec/blob/master/versions/2.1.0/README.md#compareurlformat-string | ||
*/ | ||
module.exports = { | ||
types: [ | ||
{ type: "feat", section: "Features" }, | ||
{ type: "fix", section: "Bug Fixes" }, | ||
{ type: "chore", hidden: true }, | ||
{ type: "docs", hidden: true }, | ||
{ type: "style", hidden: true }, | ||
{ type: "refactor", hidden: true }, | ||
{ type: "perf", section: "Performance" }, | ||
{ type: "test", hidden: true }, | ||
], | ||
commitUrlFormat: `${URL}/commit/{{hash}}`, | ||
compareUrlFormat: `${URL}/compare/{{previousTag}}...{{currentTag}}`, | ||
issueUrlFormat: `${URL}/issues/{{id}}`, | ||
userUrlFormat: `https://github.com//{{user}}`, | ||
bumpFiles: [ | ||
{ | ||
filename: "lib/__version__.py", | ||
updater: "scripts/python-version-updater.js", | ||
}, | ||
], | ||
}; |
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
# -*- coding=UTF-8 -*- | ||
# Code generated by scripts\python-version-updater.js, DO NOT EDIT | ||
""" | ||
version info. | ||
""" | ||
|
||
from __future__ import (absolute_import, division, print_function, | ||
unicode_literals) | ||
|
||
from datetime import datetime | ||
|
||
VERSION = '0.20.14' | ||
RELEASE_DATE = datetime.fromtimestamp(1614134854) | ||
LAST_GIT_COMMIT_DESCRIBE = 'v0.20.13-2-gff2add0' | ||
LAST_GIT_COMMIT_HASH = 'ff2add0f6cc751d66ca65eb2d047520b890b8f89' | ||
LAST_GIT_COMMIT_AUTHOR_NAME = 'NateScarlet' | ||
LAST_GIT_COMMIT_AUTHOR_EMAIL = 'NateScarlet@Gmail.com' | ||
LAST_GIT_COMMIT_AUTHOR_DATE = datetime.fromtimestamp(1614068255) | ||
LAST_GIT_COMMIT_SUBJECT = 'docs: update README.md' | ||
LAST_GIT_COMMIT_BODY = '' |
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
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,65 @@ | ||
const { execSync, exec } = require("child_process"); | ||
const { relative, dirname } = require("path"); | ||
|
||
const workspaceFolder = dirname(__dirname); | ||
|
||
/** | ||
* | ||
* @param {string} command | ||
* @returns {string} | ||
*/ | ||
function shell(command) { | ||
return execSync(command).toString().trimEnd(); | ||
} | ||
|
||
/** | ||
* | ||
* @param {string} text | ||
* @return {string} | ||
*/ | ||
function quotePython(text) { | ||
return text.replace(/\\/, "\\\\").replace(/'/g, `\\'`); | ||
} | ||
|
||
/** | ||
* @type {{ | ||
* readVersion: (content: string) => string, | ||
* writeVersion: (content: string, version: string) => string, | ||
* }} | ||
* @link https://github.com/conventional-changelog/standard-version#custom-updaters | ||
*/ | ||
module.exports = { | ||
readVersion(content) { | ||
return /VERSION = '(.+)'/.exec(content)[1]; | ||
}, | ||
writeVersion(content, version) { | ||
return `\ | ||
# -*- coding=UTF-8 -*- | ||
# Code generated by ${relative(workspaceFolder, __filename)}, DO NOT EDIT | ||
""" | ||
version info. | ||
""" | ||
from __future__ import (absolute_import, division, print_function, | ||
unicode_literals) | ||
from datetime import datetime | ||
VERSION = '${version}' | ||
RELEASE_DATE = datetime.fromtimestamp(${(Date.now() / 1e3).toFixed()}) | ||
LAST_GIT_COMMIT_DESCRIBE = '${shell("git describe --always --match v*.*.*")}' | ||
LAST_GIT_COMMIT_HASH = '${shell("git log -1 --pretty=%H")}' | ||
LAST_GIT_COMMIT_AUTHOR_NAME = '${quotePython( | ||
shell('git log -1 "--pretty=%an"') | ||
)}' | ||
LAST_GIT_COMMIT_AUTHOR_EMAIL = '${quotePython( | ||
shell('git log -1 "--pretty=%ae"') | ||
)}' | ||
LAST_GIT_COMMIT_AUTHOR_DATE = datetime.fromtimestamp(${shell( | ||
'git log -1 "--pretty=%at"' | ||
)}) | ||
LAST_GIT_COMMIT_SUBJECT = '${quotePython(shell('git log -1 "--pretty=%s'))}' | ||
LAST_GIT_COMMIT_BODY = '${quotePython(shell('git log -1 "--pretty=%b'))}' | ||
`; | ||
}, | ||
}; |
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,11 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "CommonJS", | ||
"target": "ES2018", | ||
"forceConsistentCasingInFileNames": true, | ||
"types": ["node"], | ||
"noEmit": true, | ||
"allowJs": true | ||
}, | ||
"include": ["**/*.js", "**/*.ts"] | ||
} |