Skip to content

Commit 1765f92

Browse files
Update release notes workflow (#205)
## 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? `tools/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 RELEASE_NOTES_LATEST.md to the repository. In the Release job in Factory, we validate that the release notes have been updated since the last tagged release (last by semantic version).
1 parent 26a8244 commit 1765f92

File tree

6 files changed

+52
-5
lines changed

6 files changed

+52
-5
lines changed

.factory/automation.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ release:
106106
export ARTIFACT_PASSWORD=$REPO_VATICLE_PASSWORD
107107
bazel run @vaticle_dependencies//distribution/artifact:create-netrc
108108
bazel test //:release-validate-deps --test_output=streamed
109+
validate-release-notes:
110+
image: vaticle-ubuntu-22.04
111+
command: |
112+
export NOTES_VALIDATE_TOKEN=$REPO_GITHUB_TOKEN
113+
bazel run @vaticle_dependencies//tool/release/notes:validate --test_output=streamed -- $FACTORY_OWNER $FACTORY_REPO ./RELEASE_NOTES_LATEST.md
109114
deployment:
110115
deploy-github:
111116
image: vaticle-ubuntu-22.04
@@ -118,8 +123,6 @@ release:
118123
sudo ln -s $(which python3) /usr/bin/python3
119124
sudo ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/3.7.9/lib/python3.7/site-packages/lsb_release.py
120125
python3 -m pip install certifi
121-
export NOTES_CREATE_TOKEN=$REPO_GITHUB_TOKEN
122-
bazel run @vaticle_dependencies//tool/release/notes:create -- $FACTORY_OWNER $FACTORY_REPO $FACTORY_COMMIT $(cat VERSION) ./RELEASE_TEMPLATE.md
123126
export DEPLOY_GITHUB_TOKEN=$REPO_GITHUB_TOKEN
124127
bazel run --define version=$(cat VERSION) //:deploy-github -- $FACTORY_COMMIT
125128
deploy-apt-release:

BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ deploy_github(
158158
repository = deployment_console["github.repository"],
159159
title = "TypeDB Console",
160160
title_append_version = True,
161-
release_description = "//:RELEASE_TEMPLATE.md",
161+
release_description = "//:RELEASE_NOTES_LATEST.md",
162162
archive = ":assemble-versioned-all",
163163
draft = False
164164
)
@@ -232,9 +232,9 @@ filegroup(
232232
data = [
233233
"@vaticle_dependencies//library/maven:update",
234234
"@vaticle_dependencies//distribution/artifact:create-netrc",
235-
"@vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh",
236235
"@vaticle_dependencies//tool/checkstyle:test-coverage",
237236
"@vaticle_dependencies//tool/sonarcloud:code-analysis",
238237
"@vaticle_dependencies//tool/release/notes:create",
238+
"@vaticle_dependencies//tool/release/notes:validate",
239239
],
240240
)

RELEASE_NOTES_LATEST.md

Whitespace-only changes.

dependencies/vaticle/repositories.bzl

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

2727
def vaticle_typedb_common():

tool/release/BUILD

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
)
25+

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-console HEAD $(cat VERSION) ./RELEASE_TEMPLATE.md ./RELEASE_NOTES_LATEST.md

0 commit comments

Comments
 (0)