chiark / gitweb /
gitlab-ci: fix metadata_v0 test to run on the right commits
authorHans-Christoph Steiner <hans@eds.org>
Wed, 28 Jun 2017 21:12:04 +0000 (23:12 +0200)
committerHans-Christoph Steiner <hans@eds.org>
Wed, 28 Jun 2017 21:14:57 +0000 (23:14 +0200)
Checking out master will often mean its testing the wrong commit, since
merge requests rarely are in master.

.gitlab-ci.yml

index 259e25f2e3957f386b7de3d43255cd59b7064da5..571253af2f85d49a0dad67d438974efcc2b1806e 100644 (file)
@@ -16,6 +16,7 @@ metadata_v0:
   script:
     - cd tests
     - cp dump_internal_metadata_format.py dump.py # since this isn't in old commits
+    - export GITCOMMIT=`git describe`
     - git checkout 0.7.0  # or any old commit of your choosing
     - cd ..
     - sed -i "s/'Author Email',/'Author Email',\n'Author Web Site',/" fdroidserver/metadata.py
@@ -24,7 +25,7 @@ metadata_v0:
     - ../tests/dump.py
     - cd ..
     - git reset --hard
-    - git checkout master
+    - git checkout $GITCOMMIT
     - cd fdroiddata
     - ../tests/dump.py
     - "sed -i -e '/AuthorWebSite/d'