Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9dd3e91

Browse files
committedFeb 21, 2025·
Update the versioning process
1 parent fdc88f8 commit 9dd3e91

File tree

2 files changed

+82
-43
lines changed

2 files changed

+82
-43
lines changed
 

‎docs/new-version-branch.md

+78-41
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,101 @@
11
# Create a New Version Branch
22

3-
When doing a new release for the Android App like `4.x`, a new version branch must be created based on `master`. It is necessary to do this in steps. Keep in mind that we only process master and the latest two versions. For older versions we only keep the pdf files statically - if possible.
3+
When doing a new release of this product documentation, a new version branch must be created based on `master`. It is necessary to do this in steps. Keep in mind that we only process master (version `next`) and the latest two named versions. Patch versions are excluded from this process and can be added in the product repo at any time without further notice. For patch versions, only content changes need to be added if any.
44

5-
**Step 1: This will create and configure the new `4.x` branch properly**
5+
Note that the `latest` version pointer mentioned below is virtual and not part of Antora but created by the webserver and redirects to the latest versioned product automatically.
66

7-
1. Go to the settings of this repository and check/change the protection of the branch list so that
8-
the upcoming `4.x` branch can get pushed.
9-
2. Create a new `4.x` branch based on latest `origin/master`
10-
3. Copy the `.drone.star` file from the _former_ `4.x-1` branch
11-
(it contains the correct branch specific setup rules and replaces the current one coming from master)
12-
4. In `.drone.star` set `latest_version` to `4.x` (on top in section `def main(ctx)`).
13-
5. Check in `site.yml` in section `content.sources`: that the following value is set: `- url: .` and in `content.sources.url` the following value is set: `- HEAD`.
14-
6. In `antora.yml`, set the `version:` key on top to the same as the branch name like `4.x`
15-
7. In `antora.yml`, in section `asciidoc.attributes`, DO NOT adjust relevant `-version` keys. They are only used for local building.
16-
8. In `site.yml`, in section `asciidoc.attributes`, DO NOT adjust relevant `-version` keys. They are only used for local building and will be correctly set in the docs repo when doing a full build.
17-
9. Run a build by entering `yarn antora-local`. No build errors should occur.
18-
10. Commit the changes and push the new `4.x` branch. This makes the branch available for futher processing. DO NOT CREATE A PR!
7+
**Step 1: Update github branch protection rules to allow pushing a new branch**
198

20-
**Step 2: This will configure the master branch properly to use the new `4.x` branch**
9+
Enable pushing a new branch.
2110

22-
11. Create new `changes_necessary_for_4.x` branch based on latest `origin/master`.
23-
12. In `.drone.star` set `latest_version` to `4.x` (on top in section `def main(ctx)`).
24-
13. In `antora.yml`, check if the `version:` key is set to `next`.
25-
14. In `site.yml` and in `antora.yml`, DO NOT adjust relevant `-version` keys.
26-
15. Run a build by entering `yarn antora`. No build errors or warnings should occur.
27-
16. Commit changes and push them. (Check the branch protection rules upfront so that the push passes.)
28-
17. Create a Pull Request and see the text suggestion at the bottom. When CI is green, all is done correctly. Merge the PR to master when the 4.x branch is close to be released.
11+
1. Go to the github settings of this repository and check/change the protection of the branch list in a way that
12+
the upcoming `x.y` branch can get pushed.
2913

30-
**Step 3: Protection and Renaming**
14+
**Step 2: Create and configure the new `x.y` branch properly**
3115

32-
18. Go to the settings of this repository and change the protection of the branch list so that
33-
the `4.x` branch gets protected.
34-
19. Unprotect the `4.x-2` branch and rename it to `x_archived_4.x-2`. Note that this step can be postponed if needed. Note that after renaming, local building cant be done anymore.
16+
This step creates the branch locally, necessary for content changes and for the repo building process.
3517

36-
**Step 4: Changes in the Docs Repo**
18+
1. Create a new `x.y` branch based on latest `origin/master`
19+
1. In `.drone.star` set `latest_version` to `x.y` (on top in section `def main(ctx)`).
20+
1. Check in `site.yml` in section `content.sources` that the following value is set: `- url: .` and in `content.sources.url` the following value is set: `- HEAD`.
21+
1. In `antora.yml`, set the `version:` key on top to the same as the branch name like `x.y`. Each branch must have it's unique version!
22+
1. In `antora.yml`, in section `asciidoc.attributes`, DO NOT adjust relevant `-version` keys. They are required for local building.
23+
1. In `site.yml`, in section `asciidoc.attributes`, DO NOT adjust relevant `-version` keys. They are used for local building and will be correctly set in the docs repo when doing a full build. NOTE: any attribute values defined here overwrite any attributes included via the `load-global-site-attributes.js` extension.
24+
1. Run a build by entering `npm run antora-local`. No build errors should occur.
25+
1. Commit the changes and push the new `x.y` branch. This makes the branch available for futher processing. DO NOT CREATE A PR!
3726

38-
20. In `site.yml` of the [docs](https://github.com/owncloud/docs/blob/master/site.yml) repo, adjust all `-version` keys in section `attributes` related to this repo according the new and former releases. Note that the values MUST NOT contain the trailing `@`. (The trailing @ character allows the value to be overwritten like from the corresponding `antora.yml` file which is only necessary for local building the corresponding docs-xxx repo.) Note that merging that PR should be _close before_ publishing the relevant code release.
27+
**Step 3: Protect the new branch**
3928

40-
**Step 5: Set URI `latest` Path Part to 4.x**
29+
The branch has been pushed, add it to the rule set for protected version branches.
4130

42-
21. Nothing needs to be done there. The moment when the new server release gets tagged - which is part of the release process - `latest` will be automatically set to the tagged release number. This should work automatically. If not, sysadmins need to be informed to updated the underlying process.
31+
1. Go to the github settings of this repository and change the protection of the branch list so that
32+
the `x.y` branch just pushed before now gets included in the branch protection like the other active branches do.
4333

44-
**Text Suggestion for Step 2**
34+
**Step 4: Configure the master branch to use the new `x.y` branch**
35+
36+
This step is necessary to update the building process for content changes in this repo.
37+
38+
1. Create a new `changes_necessary_for_x.y` branch based on latest `origin/master`.
39+
1. In `.drone.star` set `latest_version` to `x.y` (on top in section `def main(ctx)`).
40+
1. In `antora.yml`, check if the `version:` key is set to `next`.
41+
1. In `site.yml` and in `antora.yml`, DO NOT adjust relevant `-version` keys.
42+
1. Run a build by entering `npm run antora-local`. No build errors or warnings should occur.
43+
1. Commit changes and push them. (Check the branch protection rules upfront so that the push passes.)
44+
1. Create a Pull Request `Changes necessary for x.y`, see the [text suggestion](#text-suggestion-for-step-4) below. When CI is green, all is done correctly, merge the PR when approved. This merge does NOT add the version to the main building process. You can now add at any time content changes to this version.
45+
46+
**Step 5: Changes in the docs repo (main assembling repo)**
47+
48+
This step finally sets the versions (branches) to be built. The new x.y version branch will be added and the oldest branch of the product will be removed from building. Note that after merging the PR, the new version is live and the former version is removed. You should therefore merge _close before_ publishing the relevant product release. If this step is omitted or not timed well, the `latest` pointer from the webserver, which generates the redirect based on the latest tag of the product repo automatically, will generate a 404 instead pointing to the latest release!
49+
50+
1. In the [docs](https://github.com/owncloud/docs/blob/master/site.yml) repo, create a new `enable_<product>_x.y` branch based on latest `origin/master`, where `<product>` is the placeholder for the product this version is added for like `ocis`, or `desktop` etc.
51+
1. In file `site.yml`, adjust the versions of the respective content source to the correct versions. Add the new one and remove the oldest one.
52+
1. In file `global-attributes.yml` adjust all `-version` keys related to this repo according the new and former releases. Note that the values MUST NOT contain the trailing `@`. (The trailing @ character allows the value to be overwritten like from the corresponding `antora.yml` file which is only necessary for local building the corresponding docs-xxx repo.)
53+
1. In file `global-attributes.yml` adjust all attributes that need an update relevant for that branch like compile timestamp etc.
54+
1. Create a Pull Request `Enable <product> x.y`, see the [text suggestion](#text-suggestion-for-step-5) below.
55+
56+
**Step 6: Archive the dropped branch**
57+
58+
This step _mandatory_ needs the doc PR described before to be merged!
59+
60+
1. Unprotect the `x.z` branch which was dropped from the building process and rename it to `x_archived_x.z`. There are already branch protection rules for archived versions in place. Note that this step can be postponed if needed but it must not be processed before merging x.y in docs. Note that after renaming, also local building cant be done anymore without extra efforts - which is on purpose.
61+
62+
## **Text Suggestion for Step 4**
63+
64+
The following text is a copy/paste suggestion for the PR, replace the branch numbers accordingly:
65+
66+
```
67+
These are the changes necessary to finalize the creation of the x.y branch.
68+
69+
* The x.y branch is already pushed, prepared and is included in the branch protection rules.
70+
71+
* Note that this PR can be merged at any time but:
72+
* must be merged **before** applying content changes and
73+
* **before** merging the docs PR to include this version.
74+
75+
* Post merging this, we need to backport all relevant changes created in master to x.y
76+
77+
@mmattel @phil-davis
78+
```
79+
80+
## **Text Suggestion for Step 5**
81+
82+
The following text is a copy/paste suggestion for the PR, replace the branch numbers accordingly:
4583

46-
The following text is a copy/paste suggestion for the PR in step 2, replace the branch numbers accordingly:
4784
```
48-
These are the changes necessary to finalize the creation of the 4.x branch.
85+
Referencing: https://github.com/owncloud/docs-xxx/pull/yyy (Changes necessary for x.y)
4986
50-
* The 4.x branch is already pushed and prepared and is included in the branch protection rules.
87+
This PR enables the documentation for <product> x.y and drops version x.z
5188
52-
* When 4.x is finally out, the 4.x-2 branch can be archived, see step 3 in [Create a New Version Branch](https://github.com/owncloud/docs-client-android/blob/master/docs/new-version-branch.md)
89+
Currently on draft to avoid accidentally merging before x.y is finally out.
5390
54-
* Note, that the 4.x branch in this repo is already created, but the `latest` pointer on the web will be set to it automatically when the tag in Android is set. This means, that in the docs homepage, `latest` will point to 4.x-1 until the tag in Android is set accordingly. When merging this PR, 4.x-2 will be dropped from the web.
91+
Only merge close before the product tag gets released.
5592
56-
* Note that this PR must be merged **before** the 4.x tag in Android is set to avoid a 404 for `latest`.
93+
When this PR is merged, the dropped branch can be archived.
94+
For more details see the `Create a New Version Branch` section in the README.md of the respective docs-xxx repo repo.
5795
58-
* Note before merging this PR, we should take care that 4.x-2 has all necessary changes merged.
96+
The `latest` pointer on the web will be set automatically when the tag in the product repo is set.
5997
60-
@TheOneRing @JuancaG05 fyi
98+
Tested, a local build runs fine.
6199
62-
@mmattel @EParzefall @phil-davis
63-
Post merging this, we need to backport all relevant changes to 4.x
100+
@mmattel @phil-davis
64101
```

‎docs/the-branching-workflow.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# The Branching Workflow
22

3-
Only three branches are maintained at any one time; these are `master`, the current, and the former Android App release series. Any change to the documentation is made in a branch based off of `master`. Once the branch's PR is approved and merged, the PR is backported to the branch for the **current** Android App release and the **former** release but only if it applies to it.
3+
Only three branches are maintained for this repo at any one time; these are `master` which is referenced with `next` on the web, the current, and the former product release, but only for major and minor versions. Any change to the documentation is made in a branch based off of `master` with only a view exceptions.
44

5-
When a new ownCloud major or minor Android App version is released, a new branch is created to track the changes for that release. The branch for the oldest release is frozen, taken off the active maintained branch list and is no longer maintained.
5+
Any documentation changes for a version is created in master and backported to the version it applies to. This keeps the content consistent.
6+
7+
When a new major or minor version is released, a new branch is created to track the changes for that release, and the branch for the previous release is technically no longer maintained. That said, changes for patches and bugfixes to _some_ earlier versions are backported if reasonable.

0 commit comments

Comments
 (0)
Please sign in to comment.