Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d25357a

Browse files
committed
MAINT: Cleaner vars [skip azp] [skip actions] [skip appveyor]
1 parent 218be78 commit d25357a

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.circleci/config.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ commands:
1414
- run:
1515
name: Check-skip
1616
command: |
17-
git log --max-count=1 --pretty=format:"%B" | tr "\n" " " > commit_message.txt
18-
export COMMIT_MESSAGE=$(cat commit_message.txt);
17+
export git_log=$(git log --max-count=1 --pretty=format:"%B" | tr "\n" " ")
1918
echo "Got commit message:"
20-
echo "${COMMIT_MESSAGE}"
21-
if [[ -v CIRCLE_PULL_REQUEST ]] && ([[ "$COMMIT_MESSAGE" == *"[skip circle]"* ]] || [[ "$COMMIT_MESSAGE" == *"[circle skip]"* ]]); then
19+
echo "${git_log}"
20+
if [[ -v CIRCLE_PULL_REQUEST ]] && ([[ "$git_log" == *"[skip circle]"* ]] || [[ "$git_log" == *"[circle skip]"* ]]); then
2221
echo "Skip detected, exiting job ${CIRCLE_JOB} for PR ${CIRCLE_PULL_REQUEST}."
2322
circleci-agent step halt;
2423
fi
@@ -32,10 +31,10 @@ commands:
3231
git remote add upstream git://github.com/matplotlib/matplotlib.git
3332
fi
3433
git fetch upstream
35-
echo ${CI_PULL_REQUEST//*pull\//} | tee merge.txt
36-
if [[ $(cat merge.txt) != "" ]]; then
37-
echo "Merging $(cat merge.txt)";
38-
git pull --ff-only upstream "refs/pull/$(cat merge.txt)/merge";
34+
export merge=${CI_PULL_REQUEST//*pull\//}
35+
if [[ "$merge" != "" ]]; then
36+
echo "Merging ${merge})";
37+
git pull --ff-only upstream "refs/pull/${merge}/merge";
3938
fi
4039
4140
apt-install:

0 commit comments

Comments
 (0)