File: pumpup-micro.sh

package info (click to toggle)
pgrouting 3.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 16,520 kB
  • sloc: sql: 38,763; cpp: 21,049; ansic: 13,171; perl: 1,781; sh: 804; xml: 182; makefile: 48
file content (98 lines) | stat: -rwxr-xr-x 3,804 bytes parent folder | download
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/bin/bash
# /*PGR-GNU*****************************************************************
# File: pumpup-micro.sh
# Copyright (c) 2021 pgRouting developers
# Mail: project@pgrouting.org
# ------
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# ********************************************************************PGR-GNU*/
# ------------------------------------------------------------------------------
# pgRouting Scripts
# Copyright(c) pgRouting Contributors
#
# Pump up version
# ------------------------------------------------------------------------------

# Script to pump up branch to next development

OLD_VERSION=$(grep -Po '(?<=project\(PGROUTING VERSION )[^;]+' CMakeLists.txt)
KIND=$(grep -Po '(?<=set\(PROJECT_VERSION_DEV )[^;]+\"\)' CMakeLists.txt)
echo "KIND=${KIND}"
KIND=$(echo "${KIND}" | awk -F'"' '{print $2}')
echo "OLD_VERSION=${OLD_VERSION}"
echo "KIND=${KIND}"

IFS='\. ' read -r -a a <<< "${OLD_VERSION}"

MAYOR="${a[0]}"
MINOR="${a[1]}"
MICRO="${a[2]}"
((a[2]++))                              # increment micro
NEW_MICRO="${a[2]}"

echo "MAYOR=${MAYOR}"
echo "MINOR=${MINOR}"
echo "MICRO=${MICRO}"
echo "NEW_MICRO=${NEW_MICRO}"


NEW_VERSION="${MAYOR}.${MINOR}.${NEW_MICRO}"
U_NEW_VERSION="${NEW_VERSION//./_}"
U_OLD_VERSION="${OLD_VERSION//./_}"

echo "NEW_VERSION=${NEW_VERSION}"
echo "U_VERSION=${U_NEW_VERSION}"
echo "U_OLD_VERSION=${U_OLD_VERSION}"


# --------------------------------------------
# Modifications to CMakeLists
# --------------------------------------------

# set version to new version
perl -pi -e 's/project\(PGROUTING VERSION (.*)$/project\(PGROUTING VERSION '"${NEW_VERSION}"'/g' CMakeLists.txt
perl -pi -e 's/OLD_SIGNATURES$/OLD_SIGNATURES\n    '"${OLD_VERSION}"' /g' CMakeLists.txt

# --------------------------------------------
# Adding section in release notes & news
# --------------------------------------------
#perl -pi -e 's/(\* :ref:`changelog_'"${U_OLD_VERSION}"'`)$/\* :ref:`changelog_'"${U_NEW_VERSION}"'`\n$1/g' doc/src/release_notes.rst
#perl -pi -e 's/(\* :ref:`changelog_'"${U_OLD_VERSION}"'`)$/\* :ref:`changelog_'"${U_NEW_VERSION}"'`\n$1/g' doc/src/release_notes.rst
perl -pi -e 's/(pgRouting '"${OLD_VERSION}"' Release Notes)/
pgRouting '"${NEW_VERSION}"' Release Notes
-------------------------------------------------------------------------------

No Changes Yet

$1/g' doc/src/release_notes.rst

tools/release-scripts/notes2news.pl

# --------------------------------------------
# tests are done to new version
# --------------------------------------------

perl -pi -e 's/'"${OLD_VERSION}"'/'"${NEW_VERSION}"'/g' tools/testers/pg_prove_tests.sh

# --------------------------------------------
# Change return values of version
# --------------------------------------------

perl -pi -e 's/'"${OLD_VERSION}"'/'"${NEW_VERSION}"'/g' docqueries/version/*.result

# --------------------------------------------
# Update action to include old version
# --------------------------------------------

perl -pi -e 's/'"${OLD_VERSION}"'/'"${NEW_VERSION}"'/g' .github/workflows/update.yml
perl -pi -e 's/old_pgr: \[/old_pgr: \['"${OLD_VERSION}"', /g' .github/workflows/update.yml