This repository was archived by the owner on Jun 1, 2022. It is now read-only.
File tree 2 files changed +67
-17
lines changed
2 files changed +67
-17
lines changed Original file line number Diff line number Diff line change 1
1
## Releasing
2
2
3
3
* Make sure the ` ChangeLog ` is up to date.
4
- * Edit ` configure.ac ` and bump the version
5
- * Run the following:
6
-
7
- ./bootstrap
8
- ./configure
9
- make check -j 4
10
- sudo make install
11
-
12
- * ` make dist `
13
- * Check that you can untar this release and install it
14
- * ` git tag v{X.Y.Z} `
15
- * ` git push --tags `
16
- * Make a new release on GitHub at https://github.com/maxmind/geoip-api-c/releases
17
- * Upload the tarball you just made
18
- * Edit said release to include the changes for this release on GitHub
19
-
4
+ * Run ` dev-bin/release.sh `
20
5
21
6
## Ubuntu PPA packages
22
7
@@ -26,7 +11,7 @@ Release script:
26
11
27
12
1 . run ` dev-bin/ppa-release.sh `
28
13
29
- Manual process:
14
+ Manual PPA process:
30
15
31
16
1 . Type ` dch -i ` and add the appropriate ` debian/changelog ` entry.
32
17
2 . Move tarball created above to a temp directory and
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -eu -o pipefail
4
+
5
+ changelog=$( cat ChangeLog)
6
+
7
+ regex=' ([0-9]+\.[0-9]+\.[0-9]+) ([0-9]{4}-[0-9]{2}-[0-9]{2})
8
+
9
+ ((.|
10
+ )*)
11
+ '
12
+
13
+ if [[ ! $changelog =~ $regex ]]; then
14
+ echo " Could not find date line in change log!"
15
+ exit 1
16
+ fi
17
+
18
+ version=" ${BASH_REMATCH[1]} "
19
+ date=" ${BASH_REMATCH[2]} "
20
+ notes=" $( echo " ${BASH_REMATCH[3]} " | sed -n -e ' /^[0-9]\+\.[0-9]\+\.[0-9]\+/,$!p' ) "
21
+
22
+ dist=" GeoIP-$version .tar.gz"
23
+
24
+ if [[ " $date " != $( date +" %Y-%m-%d" ) ]]; then
25
+ echo " $date is not today!"
26
+ exit 1
27
+ fi
28
+
29
+ if [ -n " $( git status --porcelain) " ]; then
30
+ echo " . is not clean." >&2
31
+ # exit 1
32
+ fi
33
+
34
+ perl -pi -e " s/(?<=AC_INIT\(\[GeoIP\], \[)(\d+\.\d+\.\d+)(?=])/$version /gsm" configure.ac
35
+
36
+ if [ -n " $( git status --porcelain) " ]; then
37
+ git add configure.ac
38
+ git commit -m " Bumped version to $version "
39
+ fi
40
+
41
+ ./bootstrap
42
+ ./configure
43
+ make
44
+ make check
45
+ make clean
46
+ make dist
47
+
48
+ read -p " Push to origin? (y/n) " should_push
49
+
50
+ if [ " $should_push " != " y" ]; then
51
+ echo " Aborting"
52
+ exit 1
53
+ fi
54
+
55
+ git push
56
+
57
+ popd
58
+
59
+ git push
60
+
61
+ message=" $version
62
+
63
+ $notes "
64
+
65
+ hub release create -a " $dist " -m " $message " " v$version "
You can’t perform that action at this time.
0 commit comments