Skip to content
Snippets Groups Projects
Commit b1a29f33 authored by julenalbi's avatar julenalbi
Browse files

use proper principal branch

parent 4d43bc42
No related branches found
No related tags found
No related merge requests found
if git branch -a | grep -q main
then
echo "main";
else
echo "master";
fi
......@@ -18,12 +18,14 @@ update:
- git add package.json
- git commit -m "Dependencies updated to $current_version"
- npm version --allow-same-version $current_version
- git checkout master # XXX Change this
- branch=`bash get_principal_branch.sh`
- echo ${branch}
- git checkout ${branch}
- git pull
- git branch --set-upstream-to=origin/master master
- git branch --set-upstream-to=origin/${branch} ${branch}
- git merge $current_version
- git remote rm origin && git remote add origin "https://${access_token_name}:${access_token}@git.code.tecnalia.com/${CI_PROJECT_PATH}.git"
- git push --follow-tags --set-upstream origin master
- git push --follow-tags --set-upstream origin ${branch}
- node package-version-updater/updateGitlabSide.js --cV $current_version --nV $next_version -p $CI_PROJECT_ID -t $access_token
only:
- api
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment