Loading .gitlab-ci.yml +5 −8 Original line number Diff line number Diff line Loading @@ -12,10 +12,10 @@ before_script: - if [ -d "/srv/userscripts" ]; then cp -R userscripts/* /srv/userscripts ; fi - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' - eval $(ssh-agent -s) - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - echo "$SSH_PRIVATE_KEY_ENV" | tr -d '\r' | ssh-add - > /dev/null - mkdir -p ~/.ssh - chmod 700 ~/.ssh - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts - echo "$SSH_KNOWN_HOSTS_ENV" > ~/.ssh/known_hosts - chmod 644 ~/.ssh/known_hosts - export GRADLE_USER_HOME=$(pwd)/.gradle - chmod +x ./gradlew Loading Loading @@ -73,7 +73,7 @@ publish: CI_PROJECT_SSH_URL: git@gitlab.e.foundation:$CI_PROJECT_PATH GIT_STRATEGY: none before_script: - 'command -v ssh-agent >/dev/null || ( apt update -y && apt install openssh-client -y )' - 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )' - eval $(ssh-agent -s) - echo "${SSH_E_ROBOT_PRIVATE_KEY}" | tr -d '\r' | ssh-add - - mkdir -p ~/.ssh Loading @@ -90,12 +90,9 @@ publish: script: # update $UPSTREAM_BRANCH & tags - git fetch origin - git checkout $UPSTREAM_BRANCH - git checkout $LOCAL_BRANCH - git remote add upstream $UPSTREAM_URL - git fetch upstream - git pull upstream $UPSTREAM_DEFAULT_BRANCH - git push origin $UPSTREAM_BRANCH - git push origin --tags # checkout to latest tag commit to $TEMP_LATEST_TAG_BRANCH - git checkout $(git describe --tags --abbrev=0) - git checkout -b $TEMP_LATEST_TAG_BRANCH Loading @@ -112,6 +109,6 @@ update-default-branch: variables: LOCAL_BRANCH: master UPSTREAM_BRANCH: upstream/master UPSTREAM_DEFAULT_BRANCH: main UPSTREAM_DEFAULT_BRANCH: master UPSTREAM_URL: https://github.com/microg/GmsCore.git TEMP_LATEST_TAG_BRANCH: latest_upstream_tag_branch Loading
.gitlab-ci.yml +5 −8 Original line number Diff line number Diff line Loading @@ -12,10 +12,10 @@ before_script: - if [ -d "/srv/userscripts" ]; then cp -R userscripts/* /srv/userscripts ; fi - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' - eval $(ssh-agent -s) - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - echo "$SSH_PRIVATE_KEY_ENV" | tr -d '\r' | ssh-add - > /dev/null - mkdir -p ~/.ssh - chmod 700 ~/.ssh - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts - echo "$SSH_KNOWN_HOSTS_ENV" > ~/.ssh/known_hosts - chmod 644 ~/.ssh/known_hosts - export GRADLE_USER_HOME=$(pwd)/.gradle - chmod +x ./gradlew Loading Loading @@ -73,7 +73,7 @@ publish: CI_PROJECT_SSH_URL: git@gitlab.e.foundation:$CI_PROJECT_PATH GIT_STRATEGY: none before_script: - 'command -v ssh-agent >/dev/null || ( apt update -y && apt install openssh-client -y )' - 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )' - eval $(ssh-agent -s) - echo "${SSH_E_ROBOT_PRIVATE_KEY}" | tr -d '\r' | ssh-add - - mkdir -p ~/.ssh Loading @@ -90,12 +90,9 @@ publish: script: # update $UPSTREAM_BRANCH & tags - git fetch origin - git checkout $UPSTREAM_BRANCH - git checkout $LOCAL_BRANCH - git remote add upstream $UPSTREAM_URL - git fetch upstream - git pull upstream $UPSTREAM_DEFAULT_BRANCH - git push origin $UPSTREAM_BRANCH - git push origin --tags # checkout to latest tag commit to $TEMP_LATEST_TAG_BRANCH - git checkout $(git describe --tags --abbrev=0) - git checkout -b $TEMP_LATEST_TAG_BRANCH Loading @@ -112,6 +109,6 @@ update-default-branch: variables: LOCAL_BRANCH: master UPSTREAM_BRANCH: upstream/master UPSTREAM_DEFAULT_BRANCH: main UPSTREAM_DEFAULT_BRANCH: master UPSTREAM_URL: https://github.com/microg/GmsCore.git TEMP_LATEST_TAG_BRANCH: latest_upstream_tag_branch