2019-11-02 16:59:05 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
source .travis/logger.sh
|
|
|
|
source .travis/common-functions.sh
|
2019-11-09 20:20:33 +01:00
|
|
|
source .travis/github-releases-api.sh
|
2019-11-10 18:35:10 +01:00
|
|
|
source .travis/sourceforge-api.sh
|
2019-11-02 16:59:05 +01:00
|
|
|
|
2020-07-16 18:14:46 +02:00
|
|
|
VERSION=$(get_pom_version)
|
2019-11-02 16:59:05 +01:00
|
|
|
log_info "PMD Release ${VERSION}"
|
|
|
|
|
|
|
|
if ! travis_isPush; then
|
|
|
|
log_info "Not publishing release, since this is not a push!"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "${VERSION}" == *-SNAPSHOT || "${TRAVIS_TAG}" == "" ]]; then
|
|
|
|
log_info "Not publishing release, since this is not a release!"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2019-11-09 20:20:33 +01:00
|
|
|
# Publish github release
|
|
|
|
gh_releases_getLatestDraftRelease
|
|
|
|
GH_RELEASE="$RESULT"
|
2019-11-02 16:59:05 +01:00
|
|
|
|
2019-11-09 20:20:33 +01:00
|
|
|
gh_release_publishRelease "$GH_RELEASE"
|
2019-11-10 18:35:10 +01:00
|
|
|
sourceforge_selectDefault "${VERSION}"
|