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

Commit 6372b633 authored by Sayantan Roychowdhury's avatar Sayantan Roychowdhury
Browse files

Fix pushToPrebuilts job

parent 24ae3240
Loading
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -68,6 +68,8 @@ buildRelease:
      when: always
    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
      when: always
    - if: '$CI_COMMIT_TAG !~ "/^$/"'
      when: always
  script:
    - ./gradlew assembleRelease
  artifacts:
@@ -144,8 +146,8 @@ pushToPrebuilt:
    - chmod 700 ~/.ssh
    - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
    - chmod 644 ~/.ssh/known_hosts
    - git config user.email "gitlab@e.foundation"
    - git config user.name "gitlab"
    - git config --global user.email "gitlab@e.foundation"
    - git config --global user.name "gitlab"
  script:
    - NEW_APK_NAME=$(basename ${NEW_APK_PATH}*-release.apk)
    - NEW_APK_VERSION=$(awk -F '-' '{print $2}' <<< "$NEW_APK_NAME")
@@ -159,7 +161,7 @@ pushToPrebuilt:
    - sed -i "6s/.*/LOCAL_SRC_FILES := ${NEW_APK_NAME}/" Apps/Android.mk 
    - git add Apps
    - git status
    - git commit -m "Update Apps Lounge apk to ${NEW_APK_VERSION}\nFrom ${CI_COMMIT_SHA}"
    - git commit -m "Apps Lounge - ${NEW_APK_VERSION}, ${CI_COMMIT_TAG}" -m "From ${CI_COMMIT_SHA}, pipeline ${CI_PIPELINE_ID}"
    - git push
    # Sometimes a single push doesn't do all the job, so we have to push twice
    - git push 
 No newline at end of file