Skip to content

Commit

Permalink
Allow extra digits in package name
Browse files Browse the repository at this point in the history
Change-Id: I4e10783c73cf770429fb455ef2ffd671829bd149
Signed-off-by: Joe Mills <[email protected]>
  • Loading branch information
JoeMido committed Feb 9, 2015
1 parent 4711cb9 commit 23a96f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ if [ "$version_tag" == "" ]; then
version_tag=$(git describe --tags)
fi

if [[ "$version_tag" =~ ^([0-9]{4}\.[0-9]+)\+([0-9]+\.[0-9])$ ]]; then
if [[ "$version_tag" =~ ^([0-9]{4}(\.[0-9]+){1,2})\+([0-9]+\.[0-9])$ ]]; then

# For official release, e.g. 2014.2-1.0
echo "Packaging official release: $version_tag"
Expand All @@ -72,7 +72,7 @@ if [[ "$version_tag" =~ ^([0-9]{4}\.[0-9]+)\+([0-9]+\.[0-9])$ ]]; then
deb_revision=1
fi

elif [[ "$version_tag" =~ ^([0-9]{4}\.[0-9]+)\+([0-9]+\.[0-9])\.(rc[0-9]+)$ ]]; then
elif [[ "$version_tag" =~ ^([0-9]{4}(\.[0-9]+){1,2})\+([0-9]+\.[0-9])\.(rc[0-9]+)$ ]]; then
# For RC packages, e.g. 2014.2-1.0-rc1
echo "Producing RC packages for " $version_tag
upstream_version=${BASH_REMATCH[1]}
Expand All @@ -89,7 +89,7 @@ elif [[ "$version_tag" =~ ^([0-9]{4}\.[0-9]+)\+([0-9]+\.[0-9])\.(rc[0-9]+)$ ]];
deb_revision=1
fi

elif [[ "$version_tag" =~ ^([0-9]{4}\.[0-9]+)\+([0-9]+\.[0-9])\.(rc[0-9]+.*)$ ]]; then
elif [[ "$version_tag" =~ ^([0-9]{4}(\.[0-9]+){1,2})\+([0-9]+\.[0-9])\.(rc[0-9]+.*)$ ]]; then
# For unstable packages, e.g.2014.2-1.0-rc1-81-gef7115e
echo Producing unstable packages for tag: $version_tag
upstream_version=${BASH_REMATCH[1]}
Expand Down

0 comments on commit 23a96f2

Please sign in to comment.