Skip to content

Commit 4be5941

Browse files
feat: Build for release
1 parent 7a1aed4 commit 4be5941

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Once you create a new tag, this action will automatically
2222
- [Installation](#installation)
2323
- [Options](#options)
2424
- [BUILD_COMMAND](#build_command)
25-
- [DELETE_TARGETS](#delete_targets)
25+
- [CLEAN_TARGETS](#clean_targets)
2626
- [PACKAGE_MANAGER](#package_manager)
2727
- [COMMIT_MESSAGE](#commit_message)
2828
- [COMMIT_NAME](#commit_name)
@@ -96,7 +96,7 @@ Absolute path and `..` are not permitted to use.
9696
Package manager to use to install dependencies.
9797
If there is `yarn.lock` or` package-lock.json`, the action automatically determines the package manager to use, but this option can be used to specify it explicitly.
9898
(`npm` or `yarn`)
99-
default: `''`
99+
default: `''`
100100

101101
### COMMIT_MESSAGE
102102
Commit message.

build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"owner":"technote-space","repo":"release-github-actions","sha":"f36c2cbac5f0a0875699636d7ea3b1929b06147d","ref":"refs/tags/test/v2.0.0.2","tagName":"test/v2.0.0.2","branch":"gh-actions","tags":["test/v2","test/v2.0","test/v2.0.0","test/v2.0.0.2"],"updated_at":"2019-12-09T15:46:15.221Z"}
1+
{"owner":"technote-space","repo":"release-github-actions","sha":"7040d9db2e01f52c09d74bb37c0206a63c81b515","ref":"refs/tags/test/v2.0.0.3","tagName":"test/v2.0.0.3","branch":"gh-actions","tags":["test/v2","test/v2.0","test/v2.0.0","test/v2.0.0.3"],"updated_at":"2019-12-09T16:03:03.106Z"}

lib/utils/command.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const path_1 = __importDefault(require("path"));
1818
const github_action_helper_1 = require("@technote-space/github-action-helper");
1919
const misc_1 = require("./misc");
2020
const { getRepository, getTagName } = github_action_helper_1.ContextHelper;
21-
const { replaceAll, versionCompare } = github_action_helper_1.Utils;
21+
const { replaceAll, versionCompare, getPrefixRegExp } = github_action_helper_1.Utils;
2222
exports.replaceDirectory = (message) => {
2323
const directories = misc_1.getReplaceDirectory();
2424
return Object.keys(directories).reduce((value, directory) => replaceAll(replaceAll(value, ` -C ${directory}`, ''), directory, directories[directory]), message);
@@ -81,23 +81,23 @@ exports.config = () => __awaiter(void 0, void 0, void 0, function* () {
8181
yield helper.config(pushDir, name, email);
8282
});
8383
exports.commit = () => __awaiter(void 0, void 0, void 0, function* () { return helper.commit(misc_1.getParams().pushDir, misc_1.getCommitMessage()); });
84-
exports.getDeleteTestTag = (tagName, prefix = '') => __awaiter(void 0, void 0, void 0, function* () {
84+
exports.getDeleteTestTag = (tagName, prefix) => __awaiter(void 0, void 0, void 0, function* () {
8585
return (yield helper.getTags(misc_1.getParams().pushDir))
86-
.filter(tag => misc_1.isTestTag(tag))
87-
.map(tag => misc_1.getTestTag(tag))
86+
.filter(tag => getPrefixRegExp(prefix).test(tag))
87+
.map(tag => tag.replace(getPrefixRegExp(prefix), ''))
8888
.filter(tag => versionCompare(tag, tagName, false) < 0) // eslint-disable-line no-magic-numbers
89-
.map(tag => `${prefix}${misc_1.getTestTagPrefix()}${tag}`);
89+
.map(tag => `${prefix}${tag}`);
9090
});
9191
exports.deleteTestTags = (context) => __awaiter(void 0, void 0, void 0, function* () {
9292
const tagName = getTagName(context);
9393
const { pushDir } = misc_1.getParams();
9494
if (!misc_1.isTestTag(tagName) && misc_1.isEnabledCleanTestTag()) {
9595
const prefixForTestTag = misc_1.getTestTagPrefix();
9696
if (prefixForTestTag) {
97-
yield helper.deleteTag(pushDir, yield exports.getDeleteTestTag(tagName), context);
97+
yield helper.deleteTag(pushDir, yield exports.getDeleteTestTag(tagName, prefixForTestTag), context);
9898
const prefixForOriginalTag = misc_1.getOriginalTagPrefix();
9999
if (prefixForOriginalTag) {
100-
yield helper.deleteTag(pushDir, yield exports.getDeleteTestTag(tagName, prefixForOriginalTag), context);
100+
yield helper.deleteTag(pushDir, yield exports.getDeleteTestTag(tagName, prefixForOriginalTag + prefixForTestTag), context);
101101
}
102102
}
103103
}

0 commit comments

Comments
 (0)