Skip to content

Commit 750c580

Browse files
feat: Build for release
1 parent 1113e75 commit 750c580

File tree

10 files changed

+40
-93
lines changed

10 files changed

+40
-93
lines changed

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":"b1e8fbc909d48f5e6d26bcf58e59844f71c8aabf","ref":"refs/tags/v2.0.2","tagName":"v2.0.2","branch":"gh-actions","tags":["v2","v2.0","v2.0.2"],"updated_at":"2019-12-10T16:41:36.041Z"}
1+
{"owner":"technote-space","repo":"release-github-actions","sha":"e9d661a038a00b38f9a3c950916159c740103909","ref":"refs/tags/test/v2.0.3","tagName":"test/v2.0.3","branch":"gh-actions","tags":["test/v2","test/v2.0","test/v2.0.3"],"updated_at":"2019-12-15T14:04:26.180Z"}

lib/utils/command.js

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,12 @@ exports.createBuildInfoFile = (context) => __awaiter(void 0, void 0, void 0, fun
5959
'updated_at': moment_1.default().toISOString(),
6060
}));
6161
});
62-
exports.cloneForBranch = (context) => __awaiter(void 0, void 0, void 0, function* () {
62+
exports.clone = (context) => __awaiter(void 0, void 0, void 0, function* () {
6363
const { pushDir, branchName } = misc_1.getParams();
64-
startProcess('Cloning the branch [%s]...', branchName);
65-
yield helper.cloneBranch(pushDir, branchName, context);
64+
startProcess('Fetching...');
65+
yield helper.fetchOrigin(pushDir, context);
66+
startProcess('Switching branch to [%s]...', branchName);
67+
yield helper.switchBranch(pushDir, branchName);
6668
});
6769
exports.checkBranch = (clonedBranch) => __awaiter(void 0, void 0, void 0, function* () {
6870
const { pushDir, branchName } = misc_1.getParams();
@@ -148,17 +150,8 @@ exports.copyFiles = () => __awaiter(void 0, void 0, void 0, function* () {
148150
args: ['-rl', '--exclude', '.git', '--delete', `${buildDir}/`, pushDir],
149151
});
150152
});
151-
const initDirectory = () => __awaiter(void 0, void 0, void 0, function* () {
152-
const { workDir, pushDir } = misc_1.getParams();
153-
yield command.execAsync({
154-
command: 'rm',
155-
args: ['-rdf', workDir],
156-
});
157-
fs_1.default.mkdirSync(pushDir, { recursive: true });
158-
});
159153
exports.prepareCommit = (context) => __awaiter(void 0, void 0, void 0, function* () {
160-
yield initDirectory();
161-
yield exports.cloneForBranch(context);
154+
yield exports.clone(context);
162155
yield exports.checkBranch(yield helper.getCurrentBranchName(misc_1.getParams().pushDir));
163156
yield exports.prepareFiles(context);
164157
yield exports.createBuildInfoFile(context);

node_modules/.yarn-integrity

Lines changed: 19 additions & 70 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@octokit/rest/package.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@technote-space/github-action-helper/dist/command.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@technote-space/github-action-helper/dist/git-helper.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@technote-space/github-action-helper/package.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@types/node/README.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@types/node/fs.d.ts

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@types/node/package.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)