gh-action-bump-version/tests/end-to-end/git.js

21 lines
360 B
JavaScript
Raw Normal View History

2021-08-20 23:51:35 +00:00
const exec = require('./exec');
function git(options, ...params) {
return exec('git', options, ...params);
}
let firstCommit = true;
function push() {
if (firstCommit) {
firstCommit = false;
return git('push', '--force', '--set-upstream', 'origin', 'main');
} else {
return git('push');
}
}
module.exports = {
push,
default: git,
};