Skip to content

Commit 74e426b

Browse files
committed
Release checklist added
1 parent f9e9d04 commit 74e426b

File tree

2 files changed

+98
-0
lines changed

2 files changed

+98
-0
lines changed

RELEASE.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# kotlinx.atomicfu release checklist
2+
3+
To release new `<version>` of `kotlinx-atomicfu`:
4+
5+
1. Checkout `develop` branch: <br>
6+
`git checkout develop`
7+
8+
2. Retrieve the most recent `develop`: <br>
9+
`git pull`
10+
11+
3. Make sure the `master` branch is fully merged into `develop`:
12+
`git merge origin/master`
13+
14+
4. Search & replace `<old-version>` with `<version>` across the project files. Should replace in:
15+
* [`README.md`](README.md)
16+
* [`gradle.properties`](gradle.properties)
17+
* Make sure to **exclude** `CHANGES.md` from replacements.
18+
19+
As an alternative approach you can use `./bump-version.sh old_version new_version`
20+
21+
5. Write release notes in [`CHANGES.md`](CHANGES.md):
22+
* Use old releases as example of style.
23+
* Write each change on a single line (don't wrap with CR).
24+
* Study commit message from previous release.
25+
26+
6. Create branch for this release:
27+
`git checkout -b version-<version>`
28+
29+
7. Commit updated files to a new version branch:<br>
30+
`git commit -a -m "Version <version>"`
31+
32+
8. Push new version into the branch:<br>
33+
`git push -u origin version-<version>`
34+
35+
9. Create Pull-Request on GitHub from `version-<version>` branch into `master`:
36+
* Review it.
37+
* Make sure it build on CI.
38+
* Get approval for it.
39+
40+
10. Merge new version branch into `master`:<br>
41+
`git checkout master`<br>
42+
`git merge version-<version>`<br>
43+
`git push`
44+
45+
11. On [TeamCity integration server](https://teamcity.jetbrains.com/project.html?projectId=KotlinTools_KotlinxAtomicfu):
46+
* Wait until "Build" configuration for committed `master` branch passes tests.
47+
* Run "Deploy (Configure, RUN THIS ONE)" configuration with the corresponding new version.
48+
49+
12. In [GitHub](https://github.com/Kotlin/kotlinx.atomicfu) interface:
50+
* Create a release named `<version>`.
51+
* Cut & paste lines from [`CHANGES.md`](CHANGES.md) into description.
52+
53+
13. In [Bintray](https://bintray.com/kotlin/kotlinx/kotlinx.atomicfu#) admin interface:
54+
* Publish artifacts of the new version.
55+
* Wait until newly published version becomes the most recent.
56+
* Sync to Maven Central.
57+
58+
14. Switch into `develop` branch:<br>
59+
`git checkout develop`
60+
61+
15. Fetch the latest `master`:<br>
62+
`git fetch`
63+
64+
16. Merge release from `master`:<br>
65+
`git merge origin/master`
66+
67+
17. Push updates to `develop`:<br>
68+
`git push`

bump-version.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
if [ "$#" -ne 2 ]
4+
then
5+
echo "Use: ./bump-version old_version new_version"
6+
exit
7+
fi
8+
9+
old_version=$1
10+
new_version=$2
11+
12+
update_version() {
13+
echo "Updating version from '$old_version' to '$new_version' in $1"
14+
sed -i.bak s/$old_version/$new_version/g $1
15+
rm $1.bak
16+
}
17+
18+
update_version "README.md"
19+
update_version "gradle.properties"
20+
21+
# Escape dots, e.g. 1.0.0 -> 1\.0\.0
22+
escaped_old_version=$(echo $old_version | sed s/[.]/\\\\./g)
23+
result=$(find ./ -type f \( -iname \*.properties -o -iname \*.md \) | grep -v "\.gradle" | grep -v "build" | xargs -I{} grep -H "$escaped_old_version" {} | grep -v CHANGES.md)
24+
if [ -z "$result" ];
25+
then
26+
echo "Done"
27+
else
28+
echo "ERROR: Previous version is present in the project: $result"
29+
exit -1
30+
fi

0 commit comments

Comments
 (0)