fix: git push

This commit is contained in:
Simone Corsi 2021-01-16 12:55:06 +01:00
parent f41befa8e7
commit c8fb3f40ff

View File

@ -54,12 +54,7 @@ export default new (class Git {
commit = (message: string) => this.exec(`commit -m "${message}"`);
pull = async () => {
const args = ['pull', 'origin', branch];
// Check if the repo is unshallow
if (await this.isShallow()) {
args.push('--unshallow');
}
const args = ['pull'];
args.push('--tags');
args.push(core.getInput('git-pull-method'));
@ -69,14 +64,6 @@ export default new (class Git {
push = () => this.exec(`push origin ${branch} --follow-tags`);
isShallow = async () => {
const isShallow: string = await this.exec(
'rev-parse --is-shallow-repository'
);
return isShallow.trim().replace('\n', '') === 'true';
};
updateOrigin = (repo: string) => this.exec(`remote set-url origin ${repo}`);
createTag = (tag: string) => this.exec(`tag -a ${tag} -m "${tag}"`);