-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
03f0c68
commit ff1b46b
Showing
1 changed file
with
17 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
#!/bin/sh -ex | ||
#!/usr/bin/env bash | ||
|
||
: ${1?"Usage: $0 <[pre]major|[pre]minor|[pre]patch|prerelease>"} | ||
set -euxo pipefail | ||
|
||
: "${1?"Usage: $0 <[pre]major|[pre]minor|[pre]patch|prerelease>"}" | ||
: "${CHANGELOG_GITHUB_TOKEN?"Needs CHANGELOG_GITHUB_TOKEN env var"}" | ||
|
||
./mvnw scm:check-local-modification | ||
|
||
current=$(git describe --abbrev=0 || echo 0.0.0) | ||
release=$(semver ${current} -i $1 --preid RC) | ||
next=$(semver ${release} -i minor) | ||
current=$({ echo 0.0.0; git tag --list --sort=version:refname; } | tail -n1) | ||
release=$(semver "${current}" -i "$1" --preid RC) | ||
next=$(semver "${release}" -i minor) | ||
|
||
git checkout -b release/${release} | ||
git checkout -b "release/${release}" | ||
|
||
./mvnw versions:set -D newVersion=${release} | ||
./mvnw versions:set -D newVersion="${release}" | ||
git commit -am "Release ${release}" | ||
./mvnw clean deploy scm:tag -P release -D tag=${release} -D pushChanges=false -D skipTests -D dependency-check.skip | ||
./mvnw clean deploy scm:tag -P release -D tag="${release}" -D pushChanges=false -D skipTests -D dependency-check.skip | ||
|
||
git push --tags | ||
|
||
./mvnw versions:set -D newVersion=${next}-SNAPSHOT | ||
./mvnw versions:set -D newVersion="${next}-SNAPSHOT" | ||
docker run -it --rm -e CHANGELOG_GITHUB_TOKEN -v "$(pwd)":/usr/local/src/your-app \ | ||
githubchangeloggenerator/github-changelog-generator -u zalando -p problem-spring-web | ||
git commit -am "Development ${next}-SNAPSHOT" | ||
|
||
git push | ||
git push --tags | ||
|
||
git checkout main | ||
git branch -D release/${release} | ||
git branch -D "release/${release}" |