mirror of
https://github.com/SOCI/soci.git
synced 2026-05-08 04:40:25 -05:00
Update release.sh with handling of RC numbers [ci skip]
Update RELEASING.md guide about tagging.
This commit is contained in:
+26
-12
@@ -2,8 +2,9 @@
|
||||
|
||||
The releasing guide for the SOCI maintainers.
|
||||
|
||||
**NOTICE:** The `4.0` version is used below (e.g. as in `release/4.0`) to keep
|
||||
the instructions more concrete, but it is a placeholder similar to `X.Y`.
|
||||
**NOTICE:** The `4.0` and `4.0.0` version numbers are used below
|
||||
(e.g. as in `release/4.0`) to keep the instructions more concrete,
|
||||
but it is a placeholder similar to `X.Y` or `X.Y.Z`.
|
||||
It should be replaced with the version number of the new release.
|
||||
|
||||
## Update CHANGES file
|
||||
@@ -31,6 +32,7 @@ Update the version number of the new release in the following places:
|
||||
|
||||
Search through the source tree looking for other places
|
||||
that use current version number and may require an update.
|
||||
Depending on type of release, update major, minor and micro version numbers.
|
||||
|
||||
The version number also has to be updated in number of places
|
||||
on the website, see [update website](#update-website) section.
|
||||
@@ -122,25 +124,37 @@ you will build packages ready for the final release:
|
||||
|
||||
This will output the release candidate packages:
|
||||
|
||||
- `soci-4.0.Z-rc1.zip`
|
||||
- `soci-4.0.Z-rc1.tar.gz`
|
||||
- `soci-4.0.0-rc1.zip`
|
||||
- `soci-4.0.0-rc1.tar.gz`
|
||||
|
||||
or the final release packages:
|
||||
|
||||
- `soci-4.0.Z.zip`
|
||||
- `soci-4.0.Z.tar.gz`
|
||||
- `soci-4.0.0.zip`
|
||||
- `soci-4.0.0.tar.gz`
|
||||
|
||||
where `Z` is placeholder for the micro version number determined from the current
|
||||
value of the `SOCI_LIB_VERSION` macro in [include/soci/version.h](include/soci/version.h).
|
||||
where `4.0.0` is placeholder for the major, minor and micro version
|
||||
determined from the current value of the `SOCI_LIB_VERSION` macro
|
||||
in [include/soci/version.h](include/soci/version.h).
|
||||
|
||||
## Publish release
|
||||
## Publish release packages on SourceForge.net
|
||||
|
||||
- GitHub
|
||||
- SourceForge
|
||||
## Create annotated tag for final release and push to GitHub
|
||||
|
||||
## Issue announcement
|
||||
Since we use SourceForge.net to publish release packages, we do not use
|
||||
GitHub releases, so there is no need to publish a new release via GitHub.
|
||||
Creating and pushing Git annotated tag is sufficient.
|
||||
|
||||
```console
|
||||
git checkout release/4.0
|
||||
git tag -a 4.0.0 -m "Releasing SOCI 4.0.0"
|
||||
git push origin 4.0.0
|
||||
```
|
||||
|
||||
## Announce new release
|
||||
|
||||
Post the new release announcement to the project mailing lists:
|
||||
|
||||
- [soci-devel](https://sourceforge.net/p/soci/mailman/soci-devel/)
|
||||
- [soci-users](https://sourceforge.net/p/soci/mailman/soci-users/)
|
||||
|
||||
The End.
|
||||
|
||||
+15
-7
@@ -130,17 +130,25 @@ if [[ ! "$SOCI_VERSION" =~ ^[4-9]\.[0-9]\.[0-9]$ ]]; then
|
||||
else
|
||||
echo "${MSG_TAG} INFO: Releasing version $SOCI_VERSION"
|
||||
fi
|
||||
|
||||
SOCI_ARCHIVE=soci-$SOCI_VERSION
|
||||
if [[ -n $OPT_RC_NUMBER ]];then
|
||||
SOCI_ARCHIVE=$SOCI_ARCHIVE-rc$OPT_RC_NUMBER
|
||||
fi
|
||||
|
||||
if [[ -d "$SOCI_ARCHIVE" ]]; then
|
||||
echo "${MSG_TAG} ERROR: Directory '$SOCI_ARCHIVE' already exists. Remove it. Aborting."
|
||||
echo "${MSG_TAG} ERROR: Directory '$SOCI_ARCHIVE' already exists. Aborting."
|
||||
echo "${MSG_TAG} INFO: Delete it and run again."
|
||||
exit 1
|
||||
fi
|
||||
if [[ -f "${SOCI_ARCHIVE}.zip" ]]; then
|
||||
echo "${MSG_TAG} ERROR: Archive '${SOCI_ARCHIVE}.zip' already exists. Remove it. Aborting."
|
||||
echo "${MSG_TAG} ERROR: Archive '${SOCI_ARCHIVE}.zip' already exists. Aborting."
|
||||
echo "${MSG_TAG} INFO: Delete it and run again."
|
||||
exit 1
|
||||
fi
|
||||
if [[ -f "${SOCI_ARCHIVE}.tar.gz" ]]; then
|
||||
echo "${MSG_TAG} ERROR: Archive '${SOCI_ARCHIVE}.tar.gz' already exists. Remove it. Aborting."
|
||||
echo "${MSG_TAG} ERROR: Archive '${SOCI_ARCHIVE}.tar.gz' already exists. Aborting."
|
||||
echo "${MSG_TAG} INFO: Delete it and run again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -177,7 +185,7 @@ mkdocs build --clean
|
||||
echo "${MSG_TAG} INFO: Exiting Python virtual environment"
|
||||
deactivate
|
||||
|
||||
echo "${MSG_TAG} INFO: Preparing release archive '$SOCI_ARCHIVE'"
|
||||
echo "${MSG_TAG} INFO: Preparing release archive in '$SOCI_ARCHIVE'"
|
||||
mkdir $SOCI_ARCHIVE
|
||||
cp -a cmake $SOCI_ARCHIVE
|
||||
cp -a include $SOCI_ARCHIVE
|
||||
@@ -186,14 +194,14 @@ cp -a src $SOCI_ARCHIVE
|
||||
cp -a AUTHORS CHANGES CMakeLists.txt LICENSE_1_0.txt README.md Vagrantfile $SOCI_ARCHIVE/
|
||||
mv site $SOCI_ARCHIVE/docs
|
||||
|
||||
echo "${MSG_TAG} INFO: Building release archive $SOCI_ARCHIVE.zip"
|
||||
echo "${MSG_TAG} INFO: Building release archive '$SOCI_ARCHIVE.zip'"
|
||||
zip -q -r $SOCI_ARCHIVE.zip $SOCI_ARCHIVE
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "${MSG_TAG} ERROR: zip failed. Aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${MSG_TAG} INFO: Building release archive $SOCI_ARCHIVE.tar.gz"
|
||||
echo "${MSG_TAG} INFO: Building release archive '$SOCI_ARCHIVE.tar.gz'"
|
||||
tar -czf $SOCI_ARCHIVE.tar.gz $SOCI_ARCHIVE
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "${MSG_TAG} ERROR: tar failed. Aborting."
|
||||
@@ -201,7 +209,7 @@ if [[ $? -ne 0 ]]; then
|
||||
fi
|
||||
|
||||
echo "${MSG_TAG} INFO: Cleaning up"
|
||||
rm -rf "${SOCI_ARCHIVE}*"
|
||||
rm -rf "${SOCI_ARCHIVE}"
|
||||
git checkout $GIT_CURRENT_BRANCH
|
||||
|
||||
echo "${MSG_TAG} INFO: Done"
|
||||
|
||||
Reference in New Issue
Block a user