mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-10-15 06:40:54 +00:00
Update release scripts (#648)
This commit is contained in:
@@ -3,14 +3,21 @@
|
||||
* Run the https://raw.githubusercontent.com/apache/maven-mvnd/master/build/release.sh[release script] which will update the versions, the changelog, the native binaries and will tag the new git commit. This new tag will trigger the https://raw.githubusercontent.com/apache/maven-mvnd/master/.github/workflows/release.yaml[release workflow] on this newly created tag.
|
||||
[source,shell]
|
||||
----
|
||||
./build/release.sh <released-version> <next-SNAPSHOT>
|
||||
./build/release-build.sh <released-version> <next-SNAPSHOT>
|
||||
----
|
||||
|
||||
|
||||
* Once the workflow completes, run the https://raw.githubusercontent.com/apache/maven-mvnd/master/build/publish.sh[publish script] which will download the built assemblies, compute the checksums and signatures and commit them to the https://dist.apache.org/repos/dist/dev/maven/mvnd/[dev distribution repository]
|
||||
* Once the workflow completes, run the https://raw.githubusercontent.com/apache/maven-mvnd/master/build/release-candidate.sh[release-candidate script] which will download the built assemblies, compute the checksums and signatures and commit them to the https://dist.apache.org/repos/dist/dev/maven/mvnd/[dev distribution repository]
|
||||
https://github.com/apache/maven-mvnd/releases[releases].
|
||||
[source,shell]
|
||||
----
|
||||
./build/release-candidate.sh <released-version>
|
||||
----
|
||||
You can now call a vote on the mailto:dev@maven.apache.org[dev mailing list] pointing to that release candidate.
|
||||
|
||||
* Once the vote passes, publish the release.
|
||||
|
||||
* Once the vote passes, publish the release using the following command:
|
||||
[source,shell]
|
||||
----
|
||||
./build/release-publish.sh <released-version>
|
||||
----
|
||||
WARNING: *TODO*: document the publication process (move to the final svn area, homebrew, sdkman, choco updates...)
|
||||
|
62
build/publish-on-homebrew.sh
Executable file
62
build/publish-on-homebrew.sh
Executable file
@@ -0,0 +1,62 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright 2019 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
set -e
|
||||
export VERSION=$1
|
||||
|
||||
if [ "${VERSION}x" = "x" ]
|
||||
then
|
||||
echo "Specify the version: $0 [version]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -Rf target/releases/${VERSION}
|
||||
mkdir -p target/releases/${VERSION}
|
||||
pushd target/releases
|
||||
|
||||
darwinZipUrl="https://dist.apache.org/repos/dist/release/maven/mvnd/${VERSION}/maven-mvnd-${VERSION}-darwin-amd64.zip"
|
||||
darwinSha256="$(curl -L --silent "${darwinZipUrl}.sha256")"
|
||||
linuxZipUrl="https://dist.apache.org/repos/dist/release/maven/mvnd/${VERSION}/maven-mvnd-${VERSION}-linux-amd64.zip"
|
||||
linuxSha256="$(curl -L --silent "${linuxZipUrl}.sha256")"
|
||||
|
||||
echo "Updating Formula/mvnd.rb with"
|
||||
echo "version: ${VERSION}"
|
||||
echo "darwin-url: ${darwinZipUrl}"
|
||||
echo "darwin-sha256: ${darwinSha256}"
|
||||
echo "linux-url: ${linuxZipUrl}"
|
||||
echo "linux-sha256: ${linuxSha256}"
|
||||
|
||||
rm -Rf homebrew-mvnd
|
||||
git clone https://github.com/mvndaemon/homebrew-mvnd.git
|
||||
cd homebrew-mvnd
|
||||
|
||||
perl -i -0pe 's|(on_macos do\n\s+url )\"([^\"]+)\"(\n\s+sha256 )\"([^\"]+)\"|$1\"'${darwinZipUrl}'\"$3\"'${darwinSha256}'\"|g' Formula/mvnd.rb
|
||||
perl -i -0pe 's|(on_linux do\n\s+url )\"([^\"]+)\"(\n\s+sha256 )\"([^\"]+)\"|$1\"'${linuxZipUrl}'\"$3\"'${linuxSha256}'\"|g' Formula/mvnd.rb
|
||||
perl -i -0pe 's|(version )"([^\"]+)"|$1\"'${VERSION}'\"|g' Formula/mvnd.rb
|
||||
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "Committing release ${VERSION}"
|
||||
git config --global user.email "gnodet@gmail.com"
|
||||
git config --global user.name "Guillaume Nodet"
|
||||
git add -A
|
||||
git commit -m "Release ${VERSION}"
|
||||
git push origin master
|
||||
else
|
||||
echo "Nothing to commit"
|
||||
fi
|
||||
|
||||
popd
|
@@ -21,6 +21,12 @@ set -e
|
||||
|
||||
VERSION=$1
|
||||
|
||||
if [ "${VERSION}x" = "x" ]
|
||||
then
|
||||
echo "Specify the version: $0 [version]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "SDKMAN_CONSUMER_KEY: $(echo ${SDKMAN_CONSUMER_KEY} | cut -c-3)..."
|
||||
echo "SDKMAN_CONSUMER_TOKEN: $(echo ${SDKMAN_CONSUMER_TOKEN} | cut -c-3)..."
|
||||
|
||||
@@ -31,8 +37,8 @@ function publishRelease() {
|
||||
SDKMAN_PLATFORM=$2
|
||||
MVND_PLATFORM=$3
|
||||
|
||||
FILE="mvnd-${VERSION}-${MVND_PLATFORM}.zip"
|
||||
URL="https://github.com/apache/maven-mvnd/releases/download/${VERSION}/${FILE}"
|
||||
FILE="maven-mvnd-${VERSION}-${MVND_PLATFORM}.zip"
|
||||
URL="https://dist.apache.org/repos/dist/release/maven/mvnd/${VERSION}/${FILE}"
|
||||
RESPONSE="$(curl -s -X POST \
|
||||
-H "Consumer-Key: ${SDKMAN_CONSUMER_KEY}" \
|
||||
-H "Consumer-Token: ${SDKMAN_CONSUMER_TOKEN}" \
|
||||
@@ -75,7 +81,7 @@ node -pe "
|
||||
}
|
||||
" "${RESPONSE}"
|
||||
|
||||
RELEASE_URL=`curl -s -i https://git.io -F url=https://github.com/apache/maven-mvnd/releases/tag/${VERSION} | grep Location | sed -e 's/Location: //g' | tr -d '\n' | tr -d '\r'`
|
||||
RELEASE_URL=`curl -s -i https://git.io -F url=https://dist.apache.org/repos/dist/release/maven/mvnd/${VERSION} | grep Location | sed -e 's/Location: //g' | tr -d '\n' | tr -d '\r'`
|
||||
echo "RELEASE_URL = $RELEASE_URL"
|
||||
|
||||
RESPONSE="$(curl -s -X POST \
|
||||
|
38
build/release-publish.sh
Executable file
38
build/release-publish.sh
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright 2022 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
|
||||
set -e
|
||||
export VERSION=$1
|
||||
|
||||
if [ "${VERSION}x" = "x" ]
|
||||
then
|
||||
echo "Specify the version: $0 [version]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
svn move -m "Release Apache Maven Daemon ${VERSION}" \
|
||||
https://dist.apache.org/repos/dist/dev/maven/mvnd/${VERSION} \
|
||||
https://dist.apache.org/repos/dist/release/maven/mvnd/
|
||||
|
||||
./build/publish-on-homebrew.sh ${VERSION}
|
||||
./build/publish-on-sdkman.sh ${VERSION}
|
||||
# TODO: publish on macports
|
||||
# TODO: publish on chocolatey
|
||||
# TODO: publish on scoop
|
||||
|
||||
popd
|
Reference in New Issue
Block a user