Skip to content

Commit 4642316

Browse files
authored
Merge pull request #1220 from common-workflow-language/jenkins_samever_badge
jenkins: allow creating badges for already tested versions
2 parents 0b3846f + 0696eb5 commit 4642316

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

jenkins.bash

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ do
3838
if [[ "$version" = "v1.0" ]]
3939
then
4040
DRAFT="DRAFT=v1.0"
41-
pushd common-workflow-language-master
41+
pushd common-workflow-language-master || exit 1
4242
else
43-
pushd cwl-v1.1-master
43+
pushd cwl-v1.1-master || exit 1
4444
fi
4545
rm -f .coverage* coverage.xml
4646
source=$(realpath ../cwltool)
4747
COVERAGE_RC=${PWD}/.coveragerc
48-
cat > ${COVERAGE_RC} <<EOF
48+
cat > "${COVERAGE_RC}" <<EOF
4949
[run]
5050
branch = True
5151
source = ${source}
@@ -61,12 +61,12 @@ omit =
6161
tests/*
6262
EOF
6363
CWLTOOL_WITH_COV=${PWD}/cwltool_with_cov${PYTHON_VERSION}
64-
cat > ${CWLTOOL_WITH_COV} <<EOF
64+
cat > "${CWLTOOL_WITH_COV}" <<EOF
6565
#!/bin/bash
6666
coverage run --parallel-mode --rcfile=${COVERAGE_RC} \
67-
"$(which cwltool)" "\$@"
67+
"$(command -v cwltool)" "\$@"
6868
EOF
69-
chmod a+x ${CWLTOOL_WITH_COV}
69+
chmod a+x "${CWLTOOL_WITH_COV}"
7070
EXTRA="--parallel"
7171
# shellcheck disable=SC2154
7272
if [[ "$version" = *dev* ]]
@@ -84,7 +84,7 @@ EOF
8484
if [ "$GIT_BRANCH" = "origin/master" ] && [[ "$version" = "v1.0" ]] && [[ "$CONTAINER" = "docker" ]] && [ $PYTHON_VERSION -eq 3 ]
8585
then
8686
rm -Rf conformance
87-
git clone http://${jenkins_cwl_conformance}@github.com/common-workflow-language/conformance.git
87+
git clone http://"${jenkins_cwl_conformance}"@github.com/common-workflow-language/conformance.git
8888

8989
git -C conformance config user.email "[email protected]"
9090
git -C conformance config user.name "CWL Jenkins build bot"
@@ -98,7 +98,8 @@ EOM
9898

9999
tool_ver=$(cwltool --version | awk '{ print $2 }')
100100
badgedir=${PWD}/conformance/cwltool/cwl_${version}/cwltool_${tool_ver}
101-
mkdir -p ${PWD}/conformance/cwltool/cwl_${version}/
101+
mkdir -p "${PWD}"/conformance/cwltool/cwl_"${version}"/
102+
rm -fr "${badgedir}"
102103
BADGE=" --badgedir=${badgedir}"
103104
fi
104105
# shellcheck disable=SC2086

0 commit comments

Comments
 (0)