From 515c43cea8652ea2f9cf4c530d826860453f556c Mon Sep 17 00:00:00 2001 From: urosjarc Date: Mon, 25 Mar 2024 23:28:39 +0100 Subject: [PATCH] Create publish script and increase warmup timeout. --- build.gradle.kts | 2 +- publish.sh | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100755 publish.sh diff --git a/build.gradle.kts b/build.gradle.kts index 34427e9..0aa03bb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -50,7 +50,7 @@ tasks.register("github") { this.group = "verification" this.doFirst { println("Waiting for services to warm up...") - sleep(60 * 1000) + sleep(120 * 1000) println("Start with testing...") } this.tasks = listOf("test") diff --git a/publish.sh b/publish.sh new file mode 100755 index 0000000..4b8f519 --- /dev/null +++ b/publish.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +MAVEN_PROJECT="db-messiah-extra" +MAVEN_GROUP="com.urosjarc" +MAVEN_VERSION="0.0.1" +MAVEN_PATH="com/urosjarc/db-messiah-extra" + +echo "MAVEN_PROJECT: $MAVEN_PROJECT" +echo "MAVEN_GROUP: $MAVEN_GROUP" +echo "MAVEN_VERSION: $MAVEN_VERSION" +echo "MAVEN_PATH: $MAVEN_PATH" + +mkdir -p build/bundle && cd build/bundle || exit + +cp -R ~/.m2/repository/"$MAVEN_PATH"/"$MAVEN_VERSION"/* ./ + +rm -rf ./*.module* +for file in ./*; do md5sum "$file" | awk '{print $1}' > "$file".md5; done +for file in ./*; do sha1sum "$file" | awk '{print $1}' > "$file".sha1; done +rm -rf ./*.md5.sha1 + +mkdir -p "$MAVEN_PATH"/"$MAVEN_VERSION" +cp -R ./"$MAVEN_PROJECT"-"$MAVEN_VERSION"* ./"$MAVEN_PATH"/"$MAVEN_VERSION" + +rm -rf ./"$MAVEN_PROJECT"* +rm -rf bundle-"$MAVEN_VERSION".zip +zip -r bundle-"$MAVEN_VERSION".zip com + +rm -rf io +rm -rf coordinates-"$MAVEN_VERSION".txt +echo "$MAVEN_GROUP":"$MAVEN_PROJECT":"$MAVEN_VERSION" > coordinates-"$MAVEN_VERSION".txt + +rm -rf ./bundle*.md5* && rm -rf ./bundle*.sha1* +rm -rf ./coordinates*.md5* && rm -rf ./coordinates*.sha1*