File: postrelease

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 (21 lines) | stat: -rwxr-xr-x 982 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
#!/usr/bin/env bash

set -u

VERSION=$(sed -rnE 's/  VERSION ([0-9\.]+)/\1/p' CMakeLists.txt)
echo $VERSION

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

# Create new update files with `--unreleased` suffix.
cp h3/sql/updates/h3--4.2.1--4.2.2.sql h3/sql/updates/h3--$VERSION--unreleased.sql
sed -i "s/4.2.2/unreleased/g" h3/sql/updates/h3--$VERSION--unreleased.sql

cp h3_postgis/sql/updates/h3_postgis--4.2.1--4.2.2.sql h3_postgis/sql/updates/h3_postgis--$VERSION--unreleased.sql
sed -i "s/4.2.2/unreleased/g" h3_postgis/sql/updates/h3_postgis--$VERSION--unreleased.sql

# Add them to relevant `CMakeLists.txt` files.
sed -i "/--$VERSION.sql/a\ \ \ \ sql/updates/h3--$VERSION--unreleased.sql" h3/CMakeLists.txt
sed -i "/--$VERSION.sql/a\ \ \ \ sql/updates/h3_postgis--$VERSION--unreleased.sql" h3_postgis/CMakeLists.txt