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
Copy file name to clipboardExpand all lines: doc/developer_guide/developer_guide.md
+71
Original file line number
Diff line number
Diff line change
@@ -66,3 +66,74 @@ Executing the integration tests requires the following environment variables to
66
66
| `SAAS_ACCOUNT_ID` | ID of the Exasol SAAS account to be used by the tests |
67
67
| `SAAS_PAT` | Personal access token to access the SAAS API |
68
68
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