Commit 4f3c8758 authored by Anton Shestakov's avatar Anton Shestakov
Browse files

heptapod-ci: add a script to map evolve branch to mercurial revision for tests

map-hg-rev.sh can be tested using this command:

```sh
for i in $(hg log -T '{branch}\n' | sort -u); do
    echo $i $(testlib/map-hg-rev.sh $i)
done
```
parent 4941bb6d179c
Pipeline #1378 passed with stage
in 4 minutes and 14 seconds
......@@ -7,10 +7,11 @@
image: octobus/ci-py2-hgext3rd
script:
- hg pull -R /ci/repos/mercurial/
- hg -R /ci/repos/mercurial/ update `hg log -r . -T '{branch}'`
- hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')")
- hg -R /ci/repos/mercurial/ update "$hg_rev"
- (cd tests; /ci/repos/mercurial/tests/run-tests.py --color=always)
tests-py2-pure:
image: octobus/ci-py2-hgext3rd
script:
- hg pull -R /ci/repos/mercurial/
......@@ -11,13 +12,14 @@
- (cd tests; /ci/repos/mercurial/tests/run-tests.py --color=always)
tests-py2-pure:
image: octobus/ci-py2-hgext3rd
script:
- hg pull -R /ci/repos/mercurial/
- hg -R /ci/repos/mercurial/ update `hg log -r . -T '{branch}'`
- hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')")
- hg -R /ci/repos/mercurial/ update "$hg_rev"
- (cd tests; /ci/repos/mercurial/tests/run-tests.py --color=always --pure)
tests-py3-cext:
image: octobus/ci-py3-hgext3rd
script:
- hg pull -R /ci/repos/mercurial/
......@@ -18,13 +20,14 @@
- (cd tests; /ci/repos/mercurial/tests/run-tests.py --color=always --pure)
tests-py3-cext:
image: octobus/ci-py3-hgext3rd
script:
- hg pull -R /ci/repos/mercurial/
- hg -R /ci/repos/mercurial/ update `hg log -r . -T '{branch}'`
- hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')")
- hg -R /ci/repos/mercurial/ update "$hg_rev"
- (cd tests; python3 /ci/repos/mercurial/tests/run-tests.py --color=always)
tests-py3-pure:
image: octobus/ci-py3-hgext3rd
script:
- hg pull -R /ci/repos/mercurial/
......@@ -25,8 +28,9 @@
- (cd tests; python3 /ci/repos/mercurial/tests/run-tests.py --color=always)
tests-py3-pure:
image: octobus/ci-py3-hgext3rd
script:
- hg pull -R /ci/repos/mercurial/
- hg -R /ci/repos/mercurial/ update `hg log -r . -T '{branch}'`
- hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')")
- hg -R /ci/repos/mercurial/ update "$hg_rev"
- (cd tests; python3 /ci/repos/mercurial/tests/run-tests.py --color=always --pure)
#!/bin/sh
set -eu
case $1 in
default)
echo default
;;
mercurial-*)
exp=$(echo "$1" | cut -d- -f2 | sed 's#\.#\\.#g')
echo 'max(tag("re:^'"$exp"'"))'
;;
*)
echo stable
;;
esac
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