Update publication config
* Allows publication to a custom maven repo, as we do in CI tasks * Adds `SKIP_TESTS` (defaults to `false`) param for quicker testing of CI build task with `fly execute`
This commit is contained in:
@@ -232,6 +232,11 @@ configure(publishedProjects) {
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
url = project.properties.getOrDefault('publicationRepository', "${System.getenv('HOME')}/.m2/repository")
|
||||
}
|
||||
}
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
suppressAllPomMetadataWarnings()
|
||||
|
||||
@@ -3,13 +3,19 @@
|
||||
set -euo pipefail
|
||||
|
||||
readonly ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE="${ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE:-true}"
|
||||
readonly SKIP_TESTS="${SKIP_TESTS:-false}"
|
||||
|
||||
# shellcheck source=common.sh
|
||||
source "$(dirname "$0")/common.sh"
|
||||
repository=$(pwd)/distribution-repository
|
||||
if [ "$SKIP_TESTS" == "true" ]; then
|
||||
build_task=assemble
|
||||
else
|
||||
build_task=build
|
||||
fi
|
||||
|
||||
pushd git-repo >/dev/null
|
||||
./gradlew --parallel clean build install \
|
||||
./gradlew --parallel clean "$build_task" publish \
|
||||
-PonlyShowStandardStreamsOnTestFailure="${ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE}" \
|
||||
-Dmaven.repo.local="${repository}"
|
||||
-PpublicationRepository="${repository}"
|
||||
popd >/dev/null
|
||||
|
||||
@@ -37,7 +37,7 @@ git commit -m "Release v$stageVersion"
|
||||
git tag -a "v$stageVersion" -m "Release v$stageVersion"
|
||||
echo
|
||||
|
||||
./gradlew --no-daemon clean install -Dmaven.repo.local="${repository}"
|
||||
./gradlew clean publish -PpublicationRepository="${repository}"
|
||||
echo
|
||||
|
||||
echo "Setting next development version (v$nextVersion)"
|
||||
|
||||
@@ -16,3 +16,4 @@ run:
|
||||
path: git-repo/ci/scripts/build-project.sh
|
||||
params:
|
||||
ONLY_SHOW_STANDARD_STREAMS_ON_TEST_FAILURE: true
|
||||
SKIP_TESTS: false
|
||||
|
||||
Reference in New Issue
Block a user