mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-16 10:15:13 +00:00
chore: slightly simplify release-snapshot.sh
This commit is contained in:
parent
488029b9b0
commit
bb33824e87
33
.github/scripts/release-snapshot.sh
vendored
33
.github/scripts/release-snapshot.sh
vendored
@ -1,9 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
find . -name "*.jar"
|
||||||
|
|
||||||
TAG="snapshot"
|
TAG="snapshot"
|
||||||
DATE_TIME_UTC=$(date -u +"%F at %T (UTC)")
|
DATE_TIME_UTC=$(date -u +"%F at %T (UTC)")
|
||||||
RELEASE_DIR="build/github_release"
|
|
||||||
|
|
||||||
gh release delete "${TAG}" -y || true
|
gh release delete "${TAG}" -y || true
|
||||||
|
|
||||||
@ -11,26 +12,26 @@ git tag --force "${TAG}"
|
|||||||
|
|
||||||
git push --force origin "${TAG}"
|
git push --force origin "${TAG}"
|
||||||
|
|
||||||
mkdir "${RELEASE_DIR}"
|
mkdir "github_release"
|
||||||
|
|
||||||
ln -s "../publications/maven/module.json" "${RELEASE_DIR}/plantuml-SNAPSHOT-module.json"
|
cp "build/publications/maven/module.json" "github_release/plantuml-SNAPSHOT-module.json"
|
||||||
ln -s "../publications/maven/pom-default.xml" "${RELEASE_DIR}/plantuml-SNAPSHOT.pom"
|
cp "build/publications/maven/pom-default.xml" "github_release/plantuml-SNAPSHOT.pom"
|
||||||
ln -s "../libs/plantuml-${RELEASE_VERSION}.jar" "${RELEASE_DIR}/plantuml-SNAPSHOT.jar"
|
cp "build/libs/plantuml-${RELEASE_VERSION}.jar" "github_release/plantuml-SNAPSHOT.jar"
|
||||||
ln -s "../libs/plantuml-${RELEASE_VERSION}-javadoc.jar" "${RELEASE_DIR}/plantuml-SNAPSHOT-javadoc.jar"
|
cp "build/libs/plantuml-${RELEASE_VERSION}-javadoc.jar" "github_release/plantuml-SNAPSHOT-javadoc.jar"
|
||||||
ln -s "../libs/plantuml-${RELEASE_VERSION}-sources.jar" "${RELEASE_DIR}/plantuml-SNAPSHOT-sources.jar"
|
cp "build/libs/plantuml-${RELEASE_VERSION}-sources.jar" "github_release/plantuml-SNAPSHOT-sources.jar"
|
||||||
ln -s "../libs/plantuml-pdf-${RELEASE_VERSION}.jar" "${RELEASE_DIR}/plantuml-pdf-SNAPSHOT.jar"
|
cp "build/libs/plantuml-pdf-${RELEASE_VERSION}.jar" "github_release/plantuml-pdf-SNAPSHOT.jar"
|
||||||
|
|
||||||
if [[ -e "build/publications/maven/module.json.asc" ]]; then
|
if [[ -e "build/publications/maven/module.json.asc" ]]; then
|
||||||
# signatures are optional so that forked repos can release snapshots without needing a gpg signing key
|
# signatures are optional so that forked repos can release snapshots without needing a gpg signing key
|
||||||
ln -s "../publications/maven/module.json.asc" "${RELEASE_DIR}/plantuml-SNAPSHOT-module.json.asc"
|
cp "build/publications/maven/module.json.asc" "github_release/plantuml-SNAPSHOT-module.json.asc"
|
||||||
ln -s "../publications/maven/pom-default.xml.asc" "${RELEASE_DIR}/plantuml-SNAPSHOT.pom.asc"
|
cp "build/publications/maven/pom-default.xml.asc" "github_release/plantuml-SNAPSHOT.pom.asc"
|
||||||
ln -s "../libs/plantuml-${RELEASE_VERSION}.jar.asc" "${RELEASE_DIR}/plantuml-SNAPSHOT.jar.asc"
|
cp "build/libs/plantuml-${RELEASE_VERSION}.jar.asc" "github_release/plantuml-SNAPSHOT.jar.asc"
|
||||||
ln -s "../libs/plantuml-${RELEASE_VERSION}-javadoc.jar.asc" "${RELEASE_DIR}/plantuml-SNAPSHOT-javadoc.jar.asc"
|
cp "build/libs/plantuml-${RELEASE_VERSION}-javadoc.jar.asc" "github_release/plantuml-SNAPSHOT-javadoc.jar.asc"
|
||||||
ln -s "../libs/plantuml-${RELEASE_VERSION}-sources.jar.asc" "${RELEASE_DIR}/plantuml-SNAPSHOT-sources.jar.asc"
|
cp "build/libs/plantuml-${RELEASE_VERSION}-sources.jar.asc" "github_release/plantuml-SNAPSHOT-sources.jar.asc"
|
||||||
ln -s "../libs/plantuml-pdf-${RELEASE_VERSION}.jar.asc" "${RELEASE_DIR}/plantuml-pdf-SNAPSHOT.jar.asc"
|
cp "build/libs/plantuml-pdf-${RELEASE_VERSION}.jar.asc" "github_release/plantuml-pdf-SNAPSHOT.jar.asc"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "${DATE_TIME_UTC}" > "${RELEASE_DIR}/plantuml-SNAPSHOT.timestamp"
|
echo -n "${DATE_TIME_UTC}" > "github_release/plantuml-SNAPSHOT.timestamp"
|
||||||
|
|
||||||
cat <<-EOF >notes.txt
|
cat <<-EOF >notes.txt
|
||||||
## Version ~v${RELEASE_VERSION%-SNAPSHOT} of the ${DATE_TIME_UTC}
|
## Version ~v${RELEASE_VERSION%-SNAPSHOT} of the ${DATE_TIME_UTC}
|
||||||
@ -44,6 +45,6 @@ gh release create \
|
|||||||
--target "${GITHUB_SHA}" \
|
--target "${GITHUB_SHA}" \
|
||||||
--title "${TAG} (~v${RELEASE_VERSION%-SNAPSHOT})" \
|
--title "${TAG} (~v${RELEASE_VERSION%-SNAPSHOT})" \
|
||||||
--notes-file notes.txt \
|
--notes-file notes.txt \
|
||||||
"${TAG}" ${RELEASE_DIR}/*
|
"${TAG}" github_release/*
|
||||||
|
|
||||||
echo "::notice title=release snapshot::Snapshot (~v${RELEASE_VERSION%-SNAPSHOT}) released at ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/releases/tag/${TAG} and taken the ${DATE_TIME_UTC}"
|
echo "::notice title=release snapshot::Snapshot (~v${RELEASE_VERSION%-SNAPSHOT}) released at ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/releases/tag/${TAG} and taken the ${DATE_TIME_UTC}"
|
||||||
|
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@ -126,10 +126,11 @@ jobs:
|
|||||||
run: sed -i "s/version = .*/version = $POM_VERSION/" gradle.properties
|
run: sed -i "s/version = .*/version = $POM_VERSION/" gradle.properties
|
||||||
- name: Build artifacts
|
- name: Build artifacts
|
||||||
run: |
|
run: |
|
||||||
gradle -q clean build \
|
gradle clean build \
|
||||||
pdfJar \
|
pdfJar \
|
||||||
generateMetadataFileForMavenPublication generatePomFileForMavenPublication \
|
generateMetadataFileForMavenPublication generatePomFileForMavenPublication \
|
||||||
-x test
|
-x test
|
||||||
|
find . -name "*.jar"
|
||||||
- name: Sign artifacts
|
- name: Sign artifacts
|
||||||
if: env.ORG_GRADLE_PROJECT_signingKey
|
if: env.ORG_GRADLE_PROJECT_signingKey
|
||||||
env:
|
env:
|
||||||
|
Loading…
Reference in New Issue
Block a user