-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Dummy change * Disable image building on pr job * Remove dummy change * Add release files * Add execute permissions * Clear blocking pipeline
- Loading branch information
Showing
3 changed files
with
89 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "changelog-generator", | ||
"version": "0.2.0", | ||
"description": "Changelog Generator", | ||
"license": "Apache-2.0", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/kyma-project/api-gateway" | ||
}, | ||
"changelog": { | ||
"repo": "kyma-project/api-gateway", | ||
"labels": { | ||
"area/application-connector": "Application Connector", | ||
"area/serverless": "Serverless", | ||
"area/service-catalog": "Service Catalog", | ||
"area/cluster": "Cluster", | ||
"area/eventing": "Eventing", | ||
"area/security": "Security", | ||
"area/service-mesh": "Service Mesh", | ||
"area/installation": "Installation", | ||
"area/monitoring": "Monitoring", | ||
"area/logging": "Logging", | ||
"area/tracing": "Tracing", | ||
"area/console": "Console", | ||
"area/luigi": "Luigi", | ||
"area/documentation": "Documentation", | ||
"area/community": "Community", | ||
"area/ci": "CI", | ||
"area/core-and-supporting": "Core and Supporting", | ||
"area/cli": "CLI" | ||
}, | ||
"cacheDir": ".changelog" | ||
} | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/env bash | ||
|
||
# standard bash error handling | ||
set -o nounset # treat unset variables as an error and exit immediately. | ||
set -o errexit # exit immediately when a command fails. | ||
set -E # needs to be set if we want the ERR trap | ||
|
||
readonly API_GATEWAY_DIR="/home/prow/go/src/github.com/kyma-project/api-gateway" | ||
|
||
# locally delete the stable tag in order to have all the change logs listed under the new release version | ||
delete_stable_tag() { | ||
if [[ $(git tag -l stable) ]]; then | ||
git tag -d stable | ||
fi | ||
} | ||
|
||
get_new_release_version() { | ||
# get the list of tags in a reverse chronological order | ||
TAG_LIST=($(git tag --sort=-creatordate)) | ||
NEW_RELEASE_VERSION=${TAG_LIST[0]} | ||
} | ||
|
||
get_current_release_version() { | ||
# get the list of tags in a reverse chronological order excluding release candidate tags | ||
TAG_LIST_WITHOUT_RC=($(git tag --sort=-creatordate | grep -v -e "-rc")) | ||
if [[ $NEW_RELEASE_VERSION == *"-rc"* ]]; then | ||
CURRENT_RELEASE_VERSION=${TAG_LIST_WITHOUT_RC[0]} | ||
else | ||
CURRENT_RELEASE_VERSION=${TAG_LIST_WITHOUT_RC[1]} | ||
fi | ||
} | ||
|
||
main() { | ||
git remote add origin git@github.com:kyma-project/api-gateway.git | ||
delete_stable_tag | ||
get_new_release_version | ||
get_current_release_version | ||
|
||
# generate release changelog | ||
docker run --rm -v "${API_GATEWAY_DIR}":/repository -w /repository -e FROM_TAG="${CURRENT_RELEASE_VERSION}" -e NEW_RELEASE_TITLE="${NEW_RELEASE_VERSION}" -e GITHUB_AUTH="${BOT_GITHUB_TOKEN}" -e CONFIG_FILE=.github/package.json eu.gcr.io/kyma-project/changelog-generator:0.2.0 sh /app/generate-release-changelog.sh | ||
# release api-gateway with release notes generated by changelog-generator | ||
curl -sL https://git.io/goreleaser | VERSION=v0.118.2 bash -s -- --release-notes .changelog/release-changelog.md | ||
} | ||
|
||
main |