comparison contrib/phab-refresh-stack.sh @ 48697:fba2d7fab11e

phabricator-refresh: add a magic value to skip it in the CI When maintaining (light) fork, it is useful to be able to disable this. Differential Revision: https://phab.mercurial-scm.org/D12133
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 03 Feb 2022 06:49:48 +0100
parents 9be5db6148fb
children
comparison
equal deleted inserted replaced
48696:bf3da4e02087 48697:fba2d7fab11e
1 #!/bin/bash 1 #!/bin/bash
2 set -eu 2 set -eu
3
4 if [[ "$PHABRICATOR_TOKEN" == "NO-PHAB" ]]; then
5 echo 'Skipping Phabricator Step' >&2
6 exit 0
7 fi
3 8
4 revision_in_stack=`hg log \ 9 revision_in_stack=`hg log \
5 --rev '.#stack and ::. and topic()' \ 10 --rev '.#stack and ::. and topic()' \
6 -T '\nONE-REV\n' \ 11 -T '\nONE-REV\n' \
7 | grep 'ONE-REV' | wc -l` 12 | grep 'ONE-REV' | wc -l`
25 exit 2 30 exit 2
26 fi 31 fi
27 32
28 if [[ "$PHABRICATOR_TOKEN" == "" ]]; then 33 if [[ "$PHABRICATOR_TOKEN" == "" ]]; then
29 echo 'missing $PHABRICATOR_TOKEN variable' >&2 34 echo 'missing $PHABRICATOR_TOKEN variable' >&2
35 echo '(use PHABRICATOR_TOKEN="NO-PHAB" to disable this step)' >&2
30 exit 2 36 exit 2
31 fi 37 fi
32 38
33 hg \ 39 hg \
34 --config extensions.phabricator= \ 40 --config extensions.phabricator= \