Created
August 2, 2018 06:10
-
-
Save qodunpob/cdad17a191bd5996c4f61772701d74e9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* message of the last commit in source code repository */ | |
const lastCommitMessage = spawnSync( | |
'git', | |
['log', '--oneline', '-1'], | |
getSpawnOptions(rootDir, 'pipe') | |
).stdout.toString().trim(); | |
/* commit message in build repository */ | |
const message = buildBranch === 'master' ? version : lastCommitMessage; | |
/* making commit in builds repository */ | |
spawnSync('git', ['commit', '-m', `”${message}”`], getSpawnOptions(tempDir)); | |
/* creating a tag in builds repository */ | |
spawnSync('git', ['tag', tag], getSpawnOptions(tempDir)); | |
/* pushing changes to the remote repository */ | |
spawnSync('git', ['push', 'origin', buildBranch], getSpawnOptions(tempDir)); | |
spawnSync('git', ['push', '--tags'], getSpawnOptions(tempDir)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment