Skip to content

Commit

Permalink
[#783] Introduce changelog (#1221)
Browse files Browse the repository at this point in the history
Resolves #783
  • Loading branch information
pascal-holy authored Mar 11, 2021
1 parent b91cb0d commit 1d82e89
Show file tree
Hide file tree
Showing 6 changed files with 836 additions and 5 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
**/*/cli/reference.md
**/*/changelog.md
build/
bazel-*
**/*/.docusaurus
807 changes: 807 additions & 0 deletions docs/docs/changelog.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion docs/docs/concepts/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ timely manner.
Here's an outline of the process:

- We need a `GITHUB_TOKEN` environment variable with write permission to the org
- We clean up the draft release and name it `x.y.z`
- We run `./scripts/release.sh start x.y.z`
- Once release days comes, we execute the following steps:
- We test our release (`./scripts/bootstrap.sh`) and any
additional hot-fix is committed directly to the release branch
- Once we're satisfied with the release, we finish the release by running `./scripts/release.sh finish x.y.z`
- We update the version string and the sha in the [Homebrew Formula](https://github.com/airyhq/homebrew-airy/blob/main/Formula/cli.rb) for the CLI.
- We archive cards in the done column of the [work in progress](https://github.com/airyhq/airy/projects/1) board
- We rename the current draft release to `x.y.z` and publish it
- We publish the draft release
- We announce the release!

As part of the release process we are also releasing a command line client - the `Airy CLI`.
Expand Down
1 change: 1 addition & 0 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,6 @@ module.exports = {
{
'📚 Guides': ['guides/contributing'],
},
'changelog',
],
};
19 changes: 19 additions & 0 deletions scripts/changelog_md.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

set -eo pipefail
IFS=$'\n\t'

file_name="docs/docs/changelog.md"

echo "---
title: Changelog
sidebar_label: 📝 Changelog
---
" > ${file_name}

curl -H "Authorization: token ${GITHUB_TOKEN}" --request GET \
--url https://api.github.com/repos/airyhq/airy/releases \
| sed "s/##/####/g" | jq -r '.[] | "## \(.name)\n\n\(.body)"' \
| sed -E "s/\[\#([0-9]*)\]/[[#\1](https:\/\/github.com\/airyhq\/airy\/issues\/\1)]/g" \
| sed -E "s/\(\#([0-9]*)\)/[[#\1](https:\/\/github.com\/airyhq\/airy\/pull\/\1)]/g" \
>> ${file_name}
10 changes: 6 additions & 4 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ start() {
create_issue
create_release_branch
update_release_version
commit_version
commit_version_and_changelog
}

create_issue() {
Expand Down Expand Up @@ -47,11 +47,13 @@ update_release_version() {
echo -e "Updated VERSION file\n"
}

commit_version() {
command git add VERSION
commit_version_and_changelog() {
# shellcheck disable=SC1091
source scripts/changelog_md.sh "${release_number}"
command git add VERSION docs/docs/changelog.md
command git commit -m "Fixes #${issue_number}"
command git push origin release/"${release_number}"
echo -e "Updated VERSION file\n"
echo -e "Updated VERSION file and changelog.md\n"
}

create_alpha_version() {
Expand Down

0 comments on commit 1d82e89

Please sign in to comment.