File: parse_release.sh

package info (click to toggle)
pupnp 1%3A1.14.25-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,608 kB
  • sloc: ansic: 34,654; xml: 1,173; cpp: 573; makefile: 340; sh: 233; python: 51; javascript: 7
file content (18 lines) | stat: -rwxr-xr-x 438 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /bin/bash

TAGNAME=${1:-release-1.14.21}

#
# Parse the tag name
prefix=$(echo "${TAGNAME}" | sed -E 's/release-([0-9]+)\.([0-9]+)\.([0-9]+)/\1.\2/')
minor=$(echo  "${TAGNAME}" | sed -E 's/release-([0-9]+)\.([0-9]+)\.([0-9]+)/\3/')
#
# Increment the minor
next_minor=$((minor+1))
#
# Build the release numbers
curr_release="${prefix}.${minor}"
next_release="${prefix}.${next_minor}"
#
# export results
export curr_release next_release