Skip to content

Commit 6e572d3

Browse files
committed
Replace pushd and popd with git -C
1 parent ba25d05 commit 6e572d3

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

jenkins.bash

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,8 @@ EOF
8686
rm -Rf conformance
8787
git clone http://${jenkins_cwl_conformance}@github.com/common-workflow-language/conformance.git
8888

89-
pushd conformance
90-
git config user.email "[email protected]"
91-
git config user.name "CWL Jenkins build bot"
92-
popd
89+
git -C conformance config user.email "[email protected]"
90+
git -C conformance config user.name "CWL Jenkins build bot"
9391

9492
tool_ver=$(cwltool --version | awk '{ print $2 }')
9593
badgedir=${PWD}/conformance/cwltool/cwl_${version}/cwltool_${tool_ver}
@@ -109,11 +107,9 @@ EOF
109107

110108
if [ -d conformance ]
111109
then
112-
pushd conformance
113-
git add --all
114-
git diff-index --quiet HEAD || git commit -m "CWL Jenkins Build bot"
115-
git push http://${jenkins_cwl_conformance}:[email protected]/common-workflow-language/conformance.git
116-
popd
110+
git -C conformance add --all
111+
git -C conformance diff-index --quiet HEAD || git -C conformance commit -m "CWL Jenkins Build bot"
112+
git -C conformance push http://${jenkins_cwl_conformance}:[email protected]/common-workflow-language/conformance.git
117113
fi
118114

119115
deactivate

0 commit comments

Comments
 (0)