Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eba122f2 authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Fix update-from-upstream CI target

parent 3b0e3fc0
Loading
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -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
@@ -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
@@ -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
@@ -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