[ci] Improve release and build scripts
- clarification for instructions - twitter -> x - try to avoid build failures due to missing dependencies
This commit is contained in:
parent
e8c16bb683
commit
0d18146f05
10
.ci/build.sh
10
.ci/build.sh
@ -83,6 +83,16 @@ function build() {
|
||||
./mvnw clean verify -Dskip-cli-dist --show-version --errors --batch-mode "${PMD_MAVEN_EXTRA_OPTS[@]}"
|
||||
else
|
||||
# b) only pmd-cli and pmd-dist
|
||||
#
|
||||
# In the first stage build (without pmd-cli and pmd-dist), cyclonedx:makeAggregateBom tries to
|
||||
# fetch the jars of the to-be-released modules, which don't exist yet. This is recorded in *.lastUpdated
|
||||
# files in the local repo and might end up in the cache, that is used for this 2nd stage build.
|
||||
# Trying to delete the files now, if they exist.
|
||||
# Alternatively, we could run maven with flag "-U" to force update all dependencies...
|
||||
pmd_ci_log_info "Cleanup local maven repo..."
|
||||
find ~/.m2/repository -wholename "*/net/sourceforge/pmd/*/${PMD_CI_MAVEN_PROJECT_VERSION}/*.lastUpdated" | xargs rm -v
|
||||
pmd_ci_log_info "Cleanup local maven repo finished."
|
||||
|
||||
./mvnw clean verify -pl pmd-cli,pmd-dist --show-version --errors --batch-mode "${PMD_MAVEN_EXTRA_OPTS[@]}"
|
||||
fi
|
||||
else
|
||||
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -48,8 +48,6 @@ jobs:
|
||||
~/.cache
|
||||
~/work/pmd/target/repositories
|
||||
vendor/bundle
|
||||
# avoid caching missed dependencies
|
||||
!~/.m2/repository/**/*.lastUpdated
|
||||
key: v3-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
v3-${{ runner.os }}-
|
||||
|
@ -108,12 +108,12 @@ if [ "${BUILD_TOOLS_VERSION}" != "${BUILD_TOOLS_VERSION_RELEASE}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "* Update date info in **docs/_config.yml**."
|
||||
echo " date: $(date -u +%d-%B-%Y)"
|
||||
echo
|
||||
echo "* Update version info in **docs/_config.yml**."
|
||||
echo " remove the SNAPSHOT from site.pmd.version"
|
||||
echo
|
||||
echo "* Update date info in **docs/_config.yml**."
|
||||
echo " date: $(date -u +%Y-%m-%d)"
|
||||
echo
|
||||
echo "* Update **pmd-apex/src/main/resources/rulesets/apex/quickstart.xml** and"
|
||||
echo " **pmd-java/src/main/resources/rulesets/java/quickstart.xml** with the new rules."
|
||||
echo
|
||||
@ -204,7 +204,7 @@ echo
|
||||
echo "Tag has been pushed.... now check github actions: <https://github.com/pmd/pmd/actions>"
|
||||
echo
|
||||
echo "Now wait, until first stage of the release is finished successfully..."
|
||||
echo "You don't need to wait until artifacts are in maven central, just the github action must be successful."
|
||||
echo "You don't need to wait until artifacts are in maven central, just the GitHub Action must be successful."
|
||||
echo
|
||||
echo "If it is failing, you can fix the code/scripts and force push the tag via"
|
||||
echo
|
||||
@ -214,7 +214,7 @@ echo " git push origin tag \"pmd_releases/${RELEASE_VERSION}\" --force"
|
||||
echo
|
||||
echo "However: This is only possible, if the artefacts have not been pushed to maven central yet..."
|
||||
echo
|
||||
echo "Press enter to continue..."
|
||||
echo "Press enter to continue, once the GitHub Action finished successfully..."
|
||||
read -r
|
||||
|
||||
echo
|
||||
@ -344,8 +344,8 @@ tweet="${tweet//#/%23}"
|
||||
tweet="${tweet//\//%2F}"
|
||||
tweet="${tweet//$'\r'/}"
|
||||
tweet="${tweet//$'\n'/%0A}"
|
||||
echo "* Tweet about this release on https://twitter.com/pmd_analyzer:"
|
||||
echo " <https://twitter.com/intent/tweet?text=$tweet>"
|
||||
echo "* Tweet about this release on https://x.com/pmd_analyzer:"
|
||||
echo " <https://x.com/intent/post?text=$tweet>"
|
||||
echo "* Post this also into <https://matrix.to/#/#pmd_pmd:gitter.im>:"
|
||||
echo " PMD ${RELEASE_VERSION} released: https://github.com/pmd/pmd/releases/tag/pmd_releases/${RELEASE_VERSION} #PMD"
|
||||
echo
|
||||
|
Loading…
x
Reference in New Issue
Block a user