Skip to content

Commit 4e9d599

Browse files
Update release notes workflow (#184)
## What is the goal of this PR? We integrate the new release notes tooling. The release notes are now to be written by a person and committed to the repo. ## What are the changes implemented in this PR? `tool/release/create_notes.sh` is a manual replacement for automatic `@vaticle_dependencies//tool/release/notes:create` in CI. The script is meant to be executed manually by the writer of the release notes, who will edit the autocompiled notes before committing LATEST_RELEASE_NOTES.md to the repository. In the Release job in Factory, we check to see whether there were any changes committed since the release notes have last been changed, as a safeguard against accidentally releasing with stale release notes.
1 parent 3c844de commit 4e9d599

File tree

6 files changed

+49
-5
lines changed

6 files changed

+49
-5
lines changed

.factory/automation.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ release:
9898
filter:
9999
owner: vaticle
100100
branch: master
101+
validation:
102+
validate-release-notes:
103+
image: vaticle-ubuntu-22.04
104+
command: bazel run @vaticle_dependencies//tool/release/notes:validate --test_output=streamed
101105
deployment:
102106
deploy-github:
103107
image: vaticle-ubuntu-22.04
@@ -109,8 +113,6 @@ release:
109113
sudo ln -s $(which python3) /usr/bin/python3
110114
sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.7.9/lib/python3.7/site-packages/lsb_release.py
111115
python3 -m pip install certifi
112-
export NOTES_CREATE_TOKEN=$REPO_GITHUB_TOKEN
113-
bazel run @vaticle_dependencies//tool/release/notes:create -- $FACTORY_OWNER $FACTORY_REPO $FACTORY_COMMIT $(cat VERSION) ./RELEASE_TEMPLATE.md
114116
export DEPLOY_GITHUB_TOKEN=$REPO_GITHUB_TOKEN
115117
bazel run --define version=$(cat VERSION) //:deploy-github -- $FACTORY_COMMIT
116118
deploy-maven-release:

BUILD

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ deploy_github(
4747
name = "deploy-github",
4848
organisation = deployment["github.organisation"],
4949
repository = deployment["github.repository"],
50-
release_description = "//:RELEASE_TEMPLATE.md",
50+
release_description = "//:LATEST_RELEASE_NOTES.md",
5151
title = "TypeDB Protocol",
5252
title_append_version = True,
5353
draft = False,
@@ -60,7 +60,6 @@ filegroup(
6060
name = "ci",
6161
data = [
6262
"@vaticle_dependencies//library/maven:update",
63-
"@vaticle_dependencies//tool/bazelrun:rbe",
6463
"@vaticle_dependencies//tool/cargo:sync",
6564
"@vaticle_dependencies//tool/unuseddeps:unused-deps",
6665
"@vaticle_dependencies//tool/release/notes:create",

LATEST_RELEASE_NOTES.md

Whitespace-only changes.

dependencies/vaticle/repositories.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ def vaticle_dependencies():
2121
git_repository(
2222
name = "vaticle_dependencies",
2323
remote = "https://github.com/vaticle/dependencies",
24-
commit = "66596a14ec39921e04aa336af8439962d4ee0005", # sync-marker: do not remove this comment, this is used for sync-dependencies by @vaticle_dependencies
24+
commit = "172c7eed134bad3dd8a2d26cfd608b11b8e3996f", # sync-marker: do not remove this comment, this is used for sync-dependencies by @vaticle_dependencies
2525
)

tool/release/BUILD

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# Copyright (C) 2022 Vaticle
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU Affero General Public License as
6+
# published by the Free Software Foundation, either version 3 of the
7+
# License, or (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU Affero General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU Affero General Public License
15+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
16+
#
17+
18+
load("@vaticle_dependencies//tool/checkstyle:rules.bzl", "checkstyle_test")
19+
20+
checkstyle_test(
21+
name = "checkstyle",
22+
include = glob(["*"]),
23+
license_type = "agpl-header",
24+
)

tool/release/create_notes.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (C) 2022 Vaticle
4+
#
5+
# This program is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU Affero General Public License as
7+
# published by the Free Software Foundation, either version 3 of the
8+
# License, or (at your option) any later version.
9+
#
10+
# This program is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU Affero General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU Affero General Public License
16+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
#
18+
19+
bazel run @vaticle_dependencies//tool/release/notes:create -- vaticle typedb-protocol HEAD $(cat VERSION) ./RELEASE_TEMPLATE.md ./LATEST_RELEASE_NOTES.md

0 commit comments

Comments
 (0)