Skip to content

Commit 89af5ac

Browse files
ckunkikaklakariada
andauthored
#50: Described release process in Developer Guide (#52)
* #50: Described release process in Developer Guide Co-authored-by: Christoph Pirkl <4711730+kaklakariada@users.noreply.github.com>
1 parent 7d4a78a commit 89af5ac

File tree

2 files changed

+77
-2
lines changed

2 files changed

+77
-2
lines changed

doc/changes/changes_0.6.0.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
# 0.6.0 - 2024-05-21
1+
# 0.6.0 - 2024-05-22
22

33
## Feature
44

55
* #45 Added a helper function to assemble DB connection parameters.
66

7+
## Documentation
8+
9+
* #50: Described release process in Developer Guide
10+
711
## Bugfixes
812

913
* #44 Fixed the return value of the operational_saas_database_id fixture.
1014

1115
## Refactoring
1216

13-
* #19: Removed slack notifications for events other than `schedule`
17+
* #19: Removed slack notifications for events other than `schedule`

doc/developer_guide/developer_guide.md

+71
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,74 @@ Executing the integration tests requires the following environment variables to
6666
| `SAAS_ACCOUNT_ID` | ID of the Exasol SAAS account to be used by the tests |
6767
| `SAAS_PAT` | Personal access token to access the SAAS API |
6868

69+
## Creating a Release
70+
71+
### Prepare the Release
72+
73+
There are two scenarios for preparing a release:
74+
* a) [You already merged your changes to branch `main`](#scenario-a-prepare-a-release-from-branch-main)
75+
* b) [You have checked out a different branch](#scenario-b-prepare-a-release-from-another-branch)
76+
77+
In both scenarios the SAPIPY relies on Exasol's [python-toolbox](https://github.com/exasol/python-toolbox) for preparing a release.
78+
79+
The invocation depends on your setup:
80+
* When working in a poetry shell, you need to add one double-dash `--` argument to separate arguments to the nox-session `prepare-release`.
81+
* When calling `poetry` directly for one-time usage, then you need to add _two_ double-dashes `-- --` to terminate arguments to poetry and nox before arguments to the nox-session.
82+
83+
```shell
84+
poetry run nox -s prepare-release -- -- <version>
85+
```
86+
87+
#### Scenario a) Prepare a Release from Branch `main`
88+
89+
Note that this scenario requires all your changes to be merged to branch `main` and no uncommited changes to be present in your local file tree.
90+
91+
Nox session `prepare-release` will
92+
* Create a branch, e.g. `prepare-release/1.2.3` starting from `main`
93+
* Checkout this new branch
94+
* Update the version in files `pyproject.toml` and `version.py`
95+
* Update changes documentation
96+
* Rename file `doc/unreleased.md` to `doc/changes_<version>.md` and add the current date as date of the release
97+
* Create a new file `doc/unreleased.md`
98+
* Update the file `doc/changelog.md`
99+
* Commit and push the changes
100+
* Create a pull request on GitHub
101+
102+
Please note that creating a pull request on GitHub requires
103+
* Executable `gh` to be installed and in your `$PATH` variable
104+
* You must be authenticated towards GitHub via gh, use `gh auth` for that
105+
* In case you are using a GitHub token, the token must have permission `org:read`
106+
107+
##### Manually Create a Pull Request
108+
109+
If you prefer to create the pull request manually or cannot provide one of the prerequisites, you can add command line option `--no-pr`:
110+
111+
```shell
112+
poetry run nox -s prepare-release -- -- <version> --no-pr
113+
```
114+
115+
#### Scenario b) Prepare a Release from Another Branch
116+
117+
In case you currently are already working on a branch other than `main`, please ensure to have all changes commited and add command line option `--no-branch`:
118+
119+
```shell
120+
poetry run nox -s prepare-release -- -- <version> --no-pr --no-branch
121+
```
122+
123+
### Finalize and Publish the Release
124+
125+
When all workflows triggered by merging the pull request to `main` have succeeded, you can create a new release by
126+
* Switching to branch `main`
127+
* Creating a git tag and
128+
* Pushing it to `origin`
129+
130+
```shell
131+
TAG="${1}"
132+
git tag "${TAG}"
133+
git push origin "${TAG}"
134+
```
135+
136+
This will trigger additional GitHub workflows
137+
* Running some checks
138+
* Creating a GitHub release on https://github.com/exasol/saas-api-python/releases and
139+
* Publishing the release on [pypi](https://pypi.org/project/exasol-saas-api)

0 commit comments

Comments
 (0)