File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33#
44# ci-build.sh - A script to build and/or release SciJava-based projects
5- # automatically using a continuous integration
6- # service.
5+ # automatically using a continuous integration service.
76#
8- # Required environment variables:
9- # BUILD_REPOSITORY - the repository slug (org/repo) running the current build
7+ # Optional environment variables:
8+ # BUILD_REPOSITORY - the repository URL running the current build
109
1110dir=" $( dirname " $0 " ) "
1211
7776
7877 # Determine whether deploying will be possible.
7978 deployOK=
80- ciURL =$( mvn -q -Denforcer.skip=true -Dexec.executable=echo -Dexec.args=' ${project.ciManagement .url}' --non-recursive validate exec:exec 2>&1 )
79+ scmURL =$( mvn -q -Denforcer.skip=true -Dexec.executable=echo -Dexec.args=' ${project.scm .url}' --non-recursive validate exec:exec 2>&1 )
8180
8281 if [ $? -ne 0 ]; then
8382 echo " No deploy -- could not extract ciManagement URL"
8483 echo " Output of failed attempt follows:"
85- echo " $ciURL "
84+ echo " $scmURL "
8685 else
87- ciRepo=${ciURL##*/ }
88- ciPrefix=${ciURL%/* }
89- ciOrg=${ciPrefix##*/ }
86+ scmRepo=${scmURL##*/ }
9087 if [ ! " $SIGNING_ASC " ] || [ ! " $GPG_KEY_NAME " ] || [ ! " $GPG_PASSPHRASE " ] || [ ! " $MAVEN_PASS " ] || [ ! " $OSSRH_PASS " ]; then
9188 echo " No deploy -- secure environment variables not available"
92- elif [ " $BUILD_REPOSITORY " != " $ciOrg / $ciRepo " ]; then
93- echo " No deploy -- repository fork: $BUILD_REPOSITORY != $ciOrg / $ciRepo "
89+ elif [ " $BUILD_REPOSITORY " -a " $BUILD_REPOSITORY " != " $scmRepo " ]; then
90+ echo " No deploy -- repository fork: $BUILD_REPOSITORY != $scmRepo "
9491 else
9592 echo " All checks passed for artifact deployment"
9693 deployOK=1
Original file line number Diff line number Diff line change 44# ci-setup-github-actions.sh - Set CI-related environment variables from GitHub Actions.
55#
66
7- echo " BUILD_REPOSITORY=${GITHUB_REPOSITORY} "
7+ echo " BUILD_REPOSITORY=https://github.com/ ${GITHUB_REPOSITORY} "
88echo " BUILD_OS=${RUNNER_OS} "
99
10- echo " BUILD_REPOSITORY=${GITHUB_REPOSITORY} " >> $GITHUB_ENV
10+ echo " BUILD_REPOSITORY=https://github.com/ ${GITHUB_REPOSITORY} " >> $GITHUB_ENV
1111echo " BUILD_OS=${RUNNER_OS} " >> $GITHUB_ENV
You can’t perform that action at this time.
0 commit comments