You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8342b9a
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: PUBLISHING.md
+37-62Lines changed: 37 additions & 62 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,16 @@
1
1
# How to Publish a New Version
2
2
3
-
The code to be published should be in the `main` branch. Make sure that all the PRs to go in the release are
4
-
merged, and decide on the release tag. Should it be a release candidate or the final tag, and should it be
5
-
a major, minor or patch release, per [semver](https://semver.org/) rules.
3
+
The code to be published should be at the HEAD of the `main` branch or of an LTS
4
+
branch. Make sure that all the PRs to go in the release are merged, and decide
5
+
on the release tag. Should it be a release candidate or the final tag, and
6
+
should it be a major, minor or patch release, per [semver](https://semver.org/)
7
+
rules?
6
8
7
-
Once ready to do a release, create a local branch that includes the following updates:
9
+
Once ready to do a release, follow these steps:
8
10
9
-
1. Create a local PR branch from an updated `main` branch, e.g. "1.7.0".
11
+
1. Create a local PR branch from an updated `main` or LTS branch, e.g. `git checkout -b 1.7.0`.
12
+
- For a main branch release update your local `main` branch with the latest changes from the upstream `main` branch before creating the new release branch - e.g. `git fetch upstream;git merge upstream/main main`
13
+
- For an LTS release, you have to check out the latest LTS branch locally. For example, run `git fetch upstream; git checkout 1.3.lts; git merge upstream/1.3.lts --ff-only` for the appropriate LTS branch.
10
14
11
15
2. See if there are any Document Site `mkdocs` changes needed. Run the script
12
16
`./scripts/prepmkdocs.sh; mkdocs`. Watch the log, noting particularly if
@@ -17,71 +21,42 @@ Once ready to do a release, create a local branch that includes the following up
17
21
sure to do the last `clean` step -- **DO NOT MERGE THE TEMPORARY DOC
18
22
CHANGES.** For more details see the [Managing the ACA-Py Documentation Site] document.
19
23
20
-
3. Update the CHANGELOG.md to add the new release. Only create a new section
24
+
2. Update the CHANGELOG.md to add the new release. Only create a new section
21
25
when working on the first release candidate for a new release. When
22
26
transitioning from one release candidate to the next, or to an official
23
27
release, just update the title and date of the change log section.
24
28
25
-
4. Collect the details of the merged PRs included in this release -- a list of
29
+
3. Collect the details of the merged PRs included in this release -- a list of
26
30
PR title, number, link to PR, author's github ID, and a link to the author's
27
31
github account. Do not include `dependabot` PRs. For those, we put a live
28
32
link for the date range of the release (guidance below).
29
33
30
-
To generate the list, run the `./scripts/genChangeLog.sh` scripts (requires you
31
-
have [gh] and [jq] installed), with the date of the day before the last
32
-
release. The day before is picked to make sure you get all of the changes.
33
-
The script generates the list of all PRs, minus the dependabot ones, merged since
34
-
the last release in the required markdown format for the ChangeLog. At the end
35
-
of the list is some markdown for putting a link into the ChangeLog to see the
36
-
dependabot PRs merged in the release.
34
+
To generate the list, run `./scripts/genChangeLog.sh YYYY-MM-DD [<branch>]`
35
+
(requires you have [gh] and [jq] installed), with the date the day before the
36
+
last release. The day before is picked to make sure you pick up all of the
37
+
changes. The script generates the list of all PRs merged since the date
38
+
(minus, for a `main` branch runs, dependabot PRs) in the required markdown
39
+
format for the ChangeLog entry. At the end of the list is some markdown for
40
+
putting a link into a `main` branch release for the ChangeLog to see the
41
+
dependabot PRs merged in the release. Assuming you are creating a Release PR,
42
+
the last line of the output is the number of the PR you will be creating
43
+
(unless someone gets another one in before you do).
37
44
38
45
**Note**: The output of the script is _roughly_ what you need for the
39
46
ChangeLog, but use your discretion in getting the list right, and making
40
-
sure the dates for the dependabot PRs is correct. For example, when doing a
47
+
sure the dates for the dependabot PRs link is correct. For example, when doing a
41
48
follow up to an RC release, the date range in the dependabot link should
42
49
be the day before the last non-RC release, which won't be generated correctly
43
-
in this release.
50
+
for the non-RC release.
44
51
45
52
[gh]: https://github.com/cli/cli
46
53
[jq]: https://jqlang.github.io/jq/download/
47
54
48
-
From the root of the repository folder, run:
55
+
Once you have the list of PRs follow the format of past ChangeLog entries to create a complete entry for the release. After an RC entry has been created, updated it for the next RC or final release -- don't add new entries for the same release. An AI can be used to help generate the ChangeLog entry, but it is important to review the output and make sure it is correct and complete.
49
56
50
-
```bash
51
-
./scripts/genChangeLog.sh <date> [<branch>]
52
-
```
53
-
54
-
Leave off the arguments to get usage information. Date format is `YYYY-MM-DD`, and the branch defaults to `main` if not specified. The date should be the day before the last release, so that you get all of the PRs merged since the last release.
55
-
56
-
The output should look like this -- which matches what is needed in [CHANGELOG.md](CHANGELOG.md):
57
-
58
-
```text
59
-
60
-
- Only change interop testing fork on pull requests [\#3218](https://github.com/openwallet-foundation/acapy/pull/3218) [jamshale](https://github.com/jamshale)
61
-
- Remove the RC from the versions table [\#3213](https://github.com/openwallet-foundation/acapy/pull/3213) [swcurran](https://github.com/swcurran)
- ChatGPT or equivalent can be used to process the list of PRs and:
69
-
- Organize the list into suitable categories in the [CHANGELOG.md](CHANGELOG.md) file, update (if necessary) the PR title and add notes to clarify the changes. See previous release entries to understand the style -- a format that should help developers.
70
-
- Add a narrative about the release above the PR that highlights what has gone into the release.
71
-
- To cover the `dependabot` PRs without listing them all, add to the end of the
72
-
categorized list of PRs the two `dependabot` lines of the script output (after the list of PRs). The text will look like this:
73
-
74
-
```text
75
-
- Dependabot PRs
76
-
- [List of Dependabot PRs in this release](https://github.com/openwallet-foundation/acapy/pulls?q=is%3Apr+is%3Amerged+merged%3A2024-08-16..2024-09-16+author%3Aapp%2Fdependabot+)
77
-
```
78
-
79
-
- Check the dates in the `dependabot` URL to make sure the full period between the previous non-RC release to the date of the non-RC release you are preparing.
80
-
- Include a PR in the list for this soon-to-be PR, initially with the "next to be issued" number for PRs/Issues. At the end output of the script is the highest numbered PR and issue. Your PR will be one higher than the highest of those two numbers. Note that you still might have to correct the number after you create the PR if someone sneaks an issue or PR in before you submit your PR.
81
-
82
-
5. Check to see if there are any other PRs that should be included in the release.
57
+
4. Check to see if there are any other PRs that should be included in the release.
83
58
84
-
6. Update the ReadTheDocs in the `/docs` folder by following the instructions in
59
+
5. Update the ReadTheDocs in the `/docs` folder by following the instructions in
85
60
the `docs/UpdateRTD.md` file. That will likely add a number of new and modified
86
61
files to the PR. Eliminate all of the errors in the generation process,
87
62
either by mocking external dependencies or by fixing ACA-Py code. If
echo" - [Link to list of Dependabot PRs in this release](https://github.com/openwallet-foundation/acapy/pulls?q=is%3Apr+is%3Amerged+merged%3A${1}..${now}+author%3Aapp%2Fdependabot+)"
43
+
sed "${SED_ARGS[@]}"
44
+
45
+
if [ "${BRANCH}"=="main" ];then
46
+
now=$(date +%Y-%m-%d)
47
+
echo""
48
+
echo"- Dependabot PRs"
49
+
echo" - [Link to list of Dependabot PRs in this release](https://github.com/openwallet-foundation/acapy/pulls?q=is%3Apr+is%3Amerged+merged%3A${1}..${now}+author%3Aapp%2Fdependabot+)"
50
+
echo""
51
+
fi
52
+
echo"Here are the latest issue and pull request numbers:"
53
+
LATEST_ISSUE=$(gh issue list -s all -L 1 --json number --jq '.[0].number')
54
+
LATEST_PR=$(gh pr list -s all -L 1 --json number --jq '.[0].number')
0 commit comments