Skip to content

Commit 5d0ecf9

Browse files
fix(build): Fixed deployment of latest master as commit (#18)
1 parent 0beb87c commit 5d0ecf9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build/tasks.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,11 @@ export async function publishToRepo(config: Config) {
217217
await process.chdir(`${REPO_DIR}`);
218218
await util.git([`init`]);
219219
await util.git([`remote add origin ${REPO_URL}`]);
220+
await util.git(['fetch origin master --depth=1']);
221+
await util.git(['checkout origin/master']);
222+
await util.git(['checkout -b master']);
220223
await process.chdir('../../');
224+
await util.cmd('rm -rf', [`${REPO_DIR}/*`]);
221225
await util.cmd('cp', [`-R ${SOURCE_DIR}/* ${REPO_DIR}/`]);
222226
await process.chdir(`${REPO_DIR}`);
223227
await util.git([`config user.name "${COMMITTER_USER_NAME}"`]);

0 commit comments

Comments
 (0)