forked from phoedos/pmd
Merge pull request #4445 from adangel:fix-release-scripts
[ci] Improve release scripts #4445
This commit is contained in:
commit
53170cceba
@ -55,6 +55,13 @@ function build() {
|
||||
# stop early for invalid maven version and branch/tag combination
|
||||
pmd_ci_maven_verify_version || exit 0
|
||||
|
||||
# skip tests when doing a release build - this makes the process faster
|
||||
# it's a manual task now to verify that a release is only started, when the main branch
|
||||
# was green before. This is usually checked via a local build, see ./do-release.sh
|
||||
if pmd_ci_maven_isReleaseBuild; then
|
||||
PMD_MAVEN_EXTRA_OPTS+=(-DskipTests=true)
|
||||
fi
|
||||
|
||||
if [ "$(pmd_ci_utils_get_os)" != "linux" ]; then
|
||||
pmd_ci_log_group_start "Build with mvnw"
|
||||
./mvnw clean verify --show-version --errors --batch-mode --no-transfer-progress "${PMD_MAVEN_EXTRA_OPTS[@]}"
|
||||
|
@ -165,26 +165,13 @@ git commit -a -m "Prepare pmd release ${RELEASE_VERSION}"
|
||||
fi
|
||||
)
|
||||
|
||||
# for release candidates, allow snapshot dependencies
|
||||
if [[ "${RELEASE_VERSION}" == *-rc* ]]; then
|
||||
./mvnw versions:set -DnewVersion="${RELEASE_VERSION}" -DgenerateBackupPoms=false
|
||||
git commit -S -a -m "[release] prepare release pmd_releases/${RELEASE_VERSION}"
|
||||
git tag -a -s -m "[release] tag pmd_releases/${RELEASE_VERSION}" "pmd_releases/${RELEASE_VERSION}"
|
||||
# test build
|
||||
./mvnw clean verify -Denforcer.skip=true
|
||||
./mvnw versions:set -DnewVersion="${DEVELOPMENT_VERSION}" -DgenerateBackupPoms=false
|
||||
git commit -S -a -m "[release] prepare for next development iteration"
|
||||
# push
|
||||
git push origin
|
||||
git push origin tag "pmd_releases/${RELEASE_VERSION}"
|
||||
else
|
||||
./mvnw -B release:clean release:prepare \
|
||||
-Dtag="pmd_releases/${RELEASE_VERSION}" \
|
||||
-DreleaseVersion="${RELEASE_VERSION}" \
|
||||
-DdevelopmentVersion="${DEVELOPMENT_VERSION}" \
|
||||
-DscmCommentPrefix="[release] " \
|
||||
-Pgenerate-rule-docs
|
||||
fi
|
||||
./mvnw -B release:clean release:prepare \
|
||||
-Dtag="pmd_releases/${RELEASE_VERSION}" \
|
||||
-DreleaseVersion="${RELEASE_VERSION}" \
|
||||
-DdevelopmentVersion="${DEVELOPMENT_VERSION}" \
|
||||
-DscmCommentPrefix="[release] " \
|
||||
-Pgenerate-rule-docs
|
||||
|
||||
|
||||
echo
|
||||
echo "Tag has been pushed.... now check github actions: <https://github.com/pmd/pmd/actions>"
|
||||
|
Loading…
x
Reference in New Issue
Block a user