Skip to content
This repository was archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
Update GREN config and cleanup release-common.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
stealthybox committed Nov 9, 2020
1 parent 0819186 commit 084c057
Showing 3 changed files with 24 additions and 16 deletions.
4 changes: 3 additions & 1 deletion .grenrc.js
Original file line number Diff line number Diff line change
@@ -7,9 +7,11 @@ module.exports = {
"groupBy": {
"New Features": ["kind/feature"],
"API Changes": ["kind/api-change"],
"Enhancements": ["kind/enhancement"],
"Enhancements": ["kind/enhancement", "area/ux"],
"Bug Fixes": ["kind/bug"],
"Documentation": ["kind/documentation"],
"Testing": ["area/testing"],
"Releasing": ["area/releasing"],
"No category": ["closed"]
},
"changelogFilename": "docs/releases/next.md",
2 changes: 1 addition & 1 deletion docs/devel.md
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ make -C images WHAT=centos
- Update documentation for the latest version (like https://github.com/weaveworks/ignite/pull/378)
- Make sure your git remote `upstream` points to `git@github.com:weaveworks/ignite.git`, and `origin` to `git@github.com:<user>/ignite.git`
- Get a Github API token with `repo` access, and put it in `bin/gren_token` for automatic release note generation
- Make sure you have access to push to the `weaveworks/ignite*` repositories to Docker Hub
- Make sure you're part of the Ignite DockerHub Team so you have access to push to the `weaveworks/ignite*` repositories

## Releasing a minor version

34 changes: 20 additions & 14 deletions hack/release-common.sh
Original file line number Diff line number Diff line change
@@ -35,27 +35,33 @@ gen_changelog_md() {
# Generate docs/releases/next.md based of GH release notes
run_gren "changelog"
# Add the new release and existing ones to the changelog
cat docs/releases/${FULL_VERSION}.md docs/releases/next.md >> ${file}
cat "docs/releases/${FULL_VERSION}.md" docs/releases/next.md >> ${file}
# Remove the temporary file
rm docs/releases/next.md
}

write_changelog() {
# Build the gren image
docker build -t ignite-relnotes hack/relnotes

# Generate the changelog draft
if [[ ! -f docs/releases/${FULL_VERSION}.md ]]; then
# Push the tag provisionally, we'll later update it
echo "Tagging the current commit ${FULL_VERSION} temporarily in order to run gren..."
git tag -f ${FULL_VERSION}
if [[ ! -f "docs/releases/${FULL_VERSION}.md" ]]; then
# Build the gren image
docker build -t ignite-relnotes hack/relnotes

# Push a temporary changlog-tag (we'll delete this)
CHANGELOG_TAG="changelog-tmp-${FULL_VERSION}"

echo "Tagging the current commit ${CHANGELOG_TAG} temporarily in order to run gren..."
git tag -f "${CHANGELOG_TAG}"
git push upstream --tags -f

echo "Creating a changelog for PRs between tags ${FULL_VERSION}..${PREVIOUS_TAG}"
run_gren "changelog --generate --tags=${FULL_VERSION}..${PREVIOUS_TAG}"
mv docs/releases/next.md docs/releases/${FULL_VERSION}.md
echo "Creating a changelog for PRs between tags ${CHANGELOG_TAG}..${PREVIOUS_TAG}"
run_gren "changelog --generate --tags=${CHANGELOG_TAG}..${PREVIOUS_TAG}"

git push --delete upstream "${CHANGELOG_TAG}"
git tag --delete "${CHANGELOG_TAG}"

mv docs/releases/next.md "docs/releases/${FULL_VERSION}.md"
# Add an extra newline in the end of the changelog
echo "" >> docs/releases/${FULL_VERSION}.md
echo "" >> "docs/releases/${FULL_VERSION}.md"
fi

read -p "Please manually fixup the changelog file now. Continue? [y/N] " confirm
@@ -72,8 +78,8 @@ write_changelog() {
exit 1
fi

git add -A
git commit -m "Release ${FULL_VERSION}"
git add "docs/releases/${FULL_VERSION}.md" "CHANGELOG.md"
git commit -m "Document ${FULL_VERSION} change log"
}

build_push_release_artifacts() {

0 comments on commit 084c057

Please # to comment.