File: release

package info (click to toggle)
h3-pg 4.2.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,196 kB
  • sloc: sql: 4,469; ansic: 3,497; python: 322; sh: 56; makefile: 18
file content (33 lines) | stat: -rwxr-xr-x 1,248 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash

set -u
VERSION="$1"
: "$VERSION"

# Version number should be changed in root `CMakeLists.txt`.
sed -i -r "s/(  VERSION )[0-9\.]+/\1$VERSION/g" CMakeLists.txt

# Set `INSTALL_VERSION` to "${PROJECT_VERSION}".
sed -i '/set(INSTALL_VERSION "${PROJECT_VERSION}")/s/^#//g' CMakeLists.txt
sed -i '/set(INSTALL_VERSION "unreleased")/s/^/#/g' CMakeLists.txt

# Installer `.sql` files should have `@ availability` comments updated.
sed -i "s/availability: unreleased/availability: $VERSION/g" h3/sql/install/*.sql
sed -i "s/availability: unreleased/availability: $VERSION/g" h3_postgis/sql/install/*.sql

# Update files (and cmake references) suffixed `--unreleased` should be renamed.
rename unreleased "$VERSION" h3/sql/updates/*--unreleased.sql
sed -i "s/unreleased/$VERSION/g" h3/sql/updates/*--$VERSION.sql
sed -i "s/unreleased/$VERSION/g" h3/CMakeLists.txt

rename unreleased "$VERSION" h3_postgis/sql/updates/*--unreleased.sql
sed -i "s/unreleased/$VERSION/g" h3_postgis/sql/updates/*--$VERSION.sql
sed -i "s/unreleased/$VERSION/g" h3_postgis/CMakeLists.txt

# Generate docs
scripts/documentation

git checkout -b "release-$VERSION"

echo "Remember to":
echo "   - Update changelog by moving from \`Unreleased\` to a new section"