File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8383 ciRepo=${ciURL##*/ }
8484 ciPrefix=${ciURL%/* }
8585 ciOrg=${ciPrefix##*/ }
86+ git config --get remote.origin.url # ###############
8687 curl -o pull-request.txt https://api.github.com/repos/$ciOrg /$ciRepo /pulls > /dev/null 2>&1 # Check for pull requests
8788 curl -o secure-env.txt https://api.github.com/orgs/$ciOrg /$ciRepo /secrets > /dev/null 2>&1 # Check for secure env var
8889 if [ ! grep -q " documentation_url" secure-env.txt ]; then
Original file line number Diff line number Diff line change @@ -102,6 +102,10 @@ process() {
102102 fi
103103
104104 # ######################## CHANGE POM.XML??? #########################
105+ # TODO: 2 sed statements to replace the system and the url under <ciManagement> in pom.xml
106+ # <system>GitHub Actions<\system>
107+ # <url>https://github.com/$repoSlug/actions<\url>
108+ # domain: manually assign to github.com and delete the rest
105109 domain=$( grep " travis-ci\.[a-z]*/$repoSlug " pom.xml 2> /dev/null | sed ' s/.*\(travis-ci\.[a-z]*\).*/\1/' )
106110 test " $domain " &&
107111 info " Detected domain from pom.xml: $domain " ||
190194
191195 # update the README
192196 # https://docs.github.com/en/actions/managing-workflow-runs/adding-a-workflow-status-badge
193- if grep -q " github\.com\ /[a-zA-Z0-9/_-]*\ /actions/workflow/main.yml/badge.svg" README.md > /dev/null 2>&1
197+ if grep -q " github\.com/[a-zA-Z0-9/_-]*/actions/workflow/main.yml/badge.svg" README.md > /dev/null 2>&1
194198 then
195199 info " Updating README.md GitHub Action badge"
196200 sed " s|github\.com\/[a-zA-Z0-9/_-]*|$domain /$repoSlug |g" README.md > " $tmpFile "
Original file line number Diff line number Diff line change @@ -37,9 +37,15 @@ keep_alive() {
3737 wait " $pid "
3838}
3939
40+ ciURL=$( mvn -q -Denforcer.skip=true -Dexec.executable=echo -Dexec.args=' ${project.ciManagement.url}' --non-recursive validate exec:exec 2>&1 )
41+ ciRepo=${ciURL##*/ }
42+ ciPrefix=${ciURL%/* }
43+ ciOrg=${ciPrefix##*/ }
44+ curl -o pull-request.txt https://api.github.com/repos/$ciOrg /$ciRepo /pulls > /dev/null 2>&1 # Check for pull requests
45+ curl -o secure-env.txt https://api.github.com/orgs/$ciOrg /$ciRepo /secrets > /dev/null 2>&1 # Check for secure env var
4046# ####################### TODO ########################
41- if [ " $TRAVIS_SECURE_ENV_VARS " = true \
42- -a " $TRAVIS_PULL_REQUEST " = false \
47+ if [ grep -q " documentation_url " secure-env.txt \
48+ -a ! grep -q " url " pull-request.txt \
4349 -a " $TRAVIS_BRANCH " = master ]
4450then
4551 project=$1
98104 chmod 400 " $HOME /.ssh/id_rsa" &&
99105
100106 # Configure git settings.
101- # ####################### TODO ########################
102- git config --global user.email " travis@travis-ci.com" &&
103- git config --global user.name " Travis CI" &&
107+ git config --global user.email " ci@scijava.org" &&
108+ git config --global user.name " SciJava CI" &&
104109
105110 echo &&
106111 echo " == Updating javadoc.scijava.org repository ==" &&
You can’t perform that action at this time.
0 commit comments