Commit 470037c0 authored by Ben Avison's avatar Ben Avison Committed by ROOL

Utilise cache

parent 4c388488
......@@ -14,8 +14,9 @@ deploy:
- git checkout origin/master
- SOURCETAG=$(git describe --abbrev=8 --tags --always)
- BRANCH=Import$(echo $SOURCETAG | sed -e 's/[-._]//g')
- if [ -e RiscOS.zip ]; then zflag="-z RiscOS.zip"; else zflag=; fi
# As soon as the CI stuff is merged into the central project, update group and branch identifiers.
- 'curl --location --output RiscOS.zip "https://gitlab.riscosopen.org/bavison/BuildHost/-/jobs/artifacts/ci/download?job=latest_package_tree"'
- 'curl --location --output RiscOS.zip $zflag "https://gitlab.riscosopen.org/bavison/BuildHost/-/jobs/artifacts/ci/download?job=latest_package_tree"'
- unzip -q RiscOS.zip
- shopt -s expand_aliases && source RiscOS/Env/ROOL/BuildHost.sh
- git clone https://gitbot:$PASSWORD@gitlab.riscosopen.org/gitbot/PlingBuilder
......@@ -30,3 +31,6 @@ deploy:
# component, and let the srccommit instance that runs during the merge
# bring the source and binary versions back to parity
- cd PlingBuilder && git diff --quiet --exit-code || ( git checkout -b $BRANCH; if diff <(head -1 ../VersionNum) <(head -1 VersionNum) &> /dev/null; then git add .; git commit -m "Binary import from source version "$SOURCETAG$'\n!NoTag'; else NEXTVER=$(sed $'1s/^.*(\\(.*\\)).*$/\\1/;t\nd' ../VersionNum); INTVER=${NEXTVER%%.*}; FRACVER=${NEXTVER#*.}; FRACVER=${FRACVER#0}; if [ $FRACVER = 0 ]; then INTVER=$((INTVER-1)); FRACVER=99; else FRACVER=$((FRACVER-1)); fi; printf "(%d.%02d)" $INTVER $FRACVER > VersionNum; git add .; git commit -m "Binary import from source version "$SOURCETAG; fi; git push -o merge_request.create origin $BRANCH )
cache:
key: BuildHost
paths: [ RiscOS.zip ]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment