Warning, /sdk/codevis/thirdparty/soci/RELEASING.md is written in an unsupported language. File is not indexed.

0001 # Releasing
0002 
0003 The releasing guide for the SOCI maintainers.
0004 
0005 1. [Update CHANGES file](#update-changes-file)
0006 2. [Update version numbers](#update-version-numbers)
0007 3. [Add build status to README](#add-build-status-to-readme)
0008 4. [Update website content](#update-website-content)
0009 5. [Upload website content](#upload-website-content)
0010 6. [Create release branch](#create-release-branch)
0011 7. [Create source archive](#create-source-archive)
0012 8. [Publish release packages on SourceForge](#publish-release-packages-on-sourceforgenet)
0013 9. [Create annotated tag for final release and push to GitHub](create-annotated-tag-for-final-release-and-push-to-github)
0014 10. [Announce new release](#announce-new-release)
0015 
0016 **NOTICE:** The `4.0` and `4.0.0` version numbers are used below
0017 (e.g. as in `release/4.0`) to keep the instructions more concrete,
0018 but it is a placeholder similar to `X.Y` or `X.Y.Z`.
0019 It should be replaced with the version number of the new release.
0020 
0021 ## Update CHANGES file
0022 
0023 Update the list of important changes in the [CHANGES](CHANGES) file.
0024 
0025 First, start new section with new line like this:
0026 
0027 > Version X.Y.Z differs from A.B.C in the following ways:
0028 
0029 optionally, you may also want to start with `X.Y.Z-rc1`, changing through
0030 `X.Y.Z-rc2`, `X.Y.Z-rc3`, etc. to `X.Y.Z` on the course of updates
0031 towards the final release. For example, like so
0032 
0033 > Version 4.0.2 differs from 4.0.1 in the following ways:
0034 
0035 Next, it is helpful to generate complete log of changes in Markdown format:
0036 
0037 ```console
0038 git log v4.0.1..master --pretty=format:"1. [%h](http://github.com/soci/soci/commit/%H) - %s"
0039 ```
0040 
0041 Then, filter it out from trivial changes keeping only the important ones.
0042 Next, group changes in sections for core and backends, sort within sections,
0043 edit and update if necessary. Finally, copy to the `CHANGES` file.
0044 
0045 Commit the updates to the `master` branch first.
0046 See [Create release branch](#create-release-branch).
0047 
0048 ## Update AUTHORS file
0049 
0050 Use `git shortlog -s v4.0.1..` to get the list of contributors since the last
0051 release.
0052 
0053 ## Update version numbers
0054 
0055 Update the version number of the new release in the following places:
0056 
0057 - [README.md](README.md) - version in badges, links to Git tag on GitHub and release
0058 - [include/soci/version.h](include/soci/version.h)
0059 - [mkdocs.yml](mkdocs.yml) - in `release/X.Y` branch (see [create release branch](#create-release-branch)) set `site_name` with **X.Y** and keep **master** in the `master` branch.
0060 - [docs/index.md](docs/index.md)
0061 - [appveyor.yml](appveyor.yml)
0062 
0063 Search through the source tree looking for other places
0064 that use current version number and may require an update.
0065 Depending on type of release, update major, minor and micro version numbers.
0066 
0067 The version number also has to be updated in number of places
0068 on the website, see [update website](#update-website) section.
0069 
0070 ## Add build status to README
0071 
0072 Add row for `release/X.Y` to the CI build status table in [README.md](README.md).
0073 
0074 ## Update website content
0075 
0076 Update version of the new release on the [www/index.html](www/index.html) page.
0077 
0078 Add date and version of the new release on the [www/events.html](www/events.html) page.
0079 
0080 Add link to the folder with documentation for the new release
0081 on the [www/doc/index.html](www/doc/index.html) page.
0082 
0083 ## Upload website content
0084 
0085 ### Continuous deployment
0086 
0087 There is [CircleCI workflow](https://circleci.com/gh/SOCI/workflows/soci)
0088 configured in [.circleci/config.yml](.circleci/config.yml)
0089 with dedicated jobs to deploy content website and documentation.
0090 
0091 For `master` and `release/X.Y` branches, the jobs do:
0092 
0093 - lint all Markdown files
0094 - run [MkDocs](https://www.mkdocs.org) to generate HTML pages from source in [doc/](doc)
0095 - upload generated HTML files to branch-specific documentation folder (e.g. [doc/release/4.0](http://soci.sourceforge.net/doc/release/4.0/))
0096 - upload static HTML files with website pages
0097 
0098 See [manual update](#manual-update) for details about SFTP connection.
0099 
0100 ### Manual update
0101 
0102 The website is hosted on SourceForge.net at
0103 [soci.sourceforge.net](https://soci.sourceforge.net)
0104 and in order to upload updated files there, you will need:
0105 
0106 - Your SourceForge account credentials with administration rights for SOCI project (used for SFTP authentication)
0107 - [SFTP client to connect to SourceForge host](https://sourceforge.net/p/forge/documentation/SFTP/).
0108 
0109 For example, you can use `lftp` to upload website and documentation
0110 files similarly to our CircleCI workflow configured to generate and
0111 deploy documentation (see [.circleci/config.yml](.circleci/config.yml)):
0112 
0113 ```console
0114 lftp sftp://${DEPLOY_DOCS_USER}:${DEPLOY_DOCS_PASS}@web.sourceforge.net -e "set ftp:ssl-force true; set ftp:ssl-protect-data true; set ssl:verify-certificate no; set sftp:auto-confirm yes; mirror -v -R <source> <target directory>; quit"
0115 ```
0116 
0117 where `<source>` denotes a file or folder to be copied
0118 and `<target directory>` is a directory under Web content folder
0119 of SOCI on `web.sourceforge.net` i.e. `/home/project-web/soci/htdocs`.
0120 
0121 ## Create release branch
0122 
0123 ```console
0124 git checkout master
0125 git branch release/4.0
0126 ```
0127 
0128 **NOTICE:**: All changes preparing the release or hotfixes should be
0129 committed to `master` branch first, then merged to `release/X.Y` branch
0130 that is being released. If it is a newly created `release/X.Y` branch,
0131 then prefer fast-forward merges from `master`. In other cases, e.g.
0132 if `release/X.Y` is an existing release branch and you are releasing a bugfix
0133 release, you may have to perform true merge.
0134 
0135 ## Create source archive
0136 
0137 **NOTICE:** Run this step in Linux environment only.
0138 
0139 Run [scripts/release.sh](scripts/release.sh) script to build release archives
0140 with content from `release/X.Y` branch.
0141 
0142 ```console
0143 cd soci
0144 ./scripts/release.sh --help
0145 ```
0146 
0147 First, you will want to build number of release candidates (typically 1-3, rarely 5-6):
0148 
0149 ```console
0150 ./scripts/release.sh --rc 1 release/4.0
0151 ./scripts/release.sh --rc 2 release/4.0
0152 ...
0153 ```
0154 
0155 Eventually, once release candidates have been reviewed and verified,
0156 you will build packages ready for the final release:
0157 
0158 ```console
0159 ./scripts/release.sh release/4.0
0160 ```
0161 
0162 This will output the release candidate packages:
0163 
0164 - `soci-4.0.0-rc1.zip`
0165 - `soci-4.0.0-rc1.tar.gz`
0166 
0167 or the final release packages:
0168 
0169 - `soci-4.0.0.zip`
0170 - `soci-4.0.0.tar.gz`
0171 
0172 where `4.0.0` is placeholder for the major, minor and micro version
0173 determined from the current value of the `SOCI_LIB_VERSION` macro
0174 in [include/soci/version.h](include/soci/version.h).
0175 
0176 ## Publish release packages on SourceForge
0177 
0178 1. Sign in to SourceForge.net using your own credentials (you need SOCI Admin privileges).
0179 2. Go to https://sourceforge.net/projects/soci/files/soci/ page.
0180 3. Hit "Add Folder" and create `soci-X.Y.Z` if it does not exist yet (e.g. `soci-4.0.0`)
0181 4. Go to https://sourceforge.net/projects/soci/files/soci/soci-4.0.0/
0182 5. Hit "Add File" and upload source packages prepared for release, including release candidates.
0183 
0184 ## Announce release candidates
0185 
0186 Post brief announcement about the issued release candidate to the project
0187 mailing lists: [soci-devel](https://sourceforge.net/p/soci/mailman/soci-devel/)
0188 and [soci-users](https://sourceforge.net/p/soci/mailman/soci-users/).
0189 
0190 ## Create annotated tag for final release and push to GitHub
0191 
0192 Since we use SourceForge.net to publish release packages, we do not use
0193 GitHub releases, so there is no need to publish a new release via GitHub.
0194 Creating and pushing Git annotated tag is sufficient.
0195 
0196 ```console
0197 git checkout release/4.0
0198 git tag -a v4.0.2 -m "Releasing SOCI 4.0.2"
0199 git push origin v4.0.2
0200 ```
0201 
0202 ## Announce final release
0203 
0204 Post the final release announcement to the project mailing lists:
0205 [soci-devel](https://sourceforge.net/p/soci/mailman/soci-devel/)
0206 and [soci-users](https://sourceforge.net/p/soci/mailman/soci-users/).
0207 
0208 The End.