Skip to content

Commit

Permalink
Handle new tag scheme in the packaging script
Browse files Browse the repository at this point in the history
Change-Id: I8b7474eb82f94ed12c890090801e2afd3ef2e405
  • Loading branch information
Tomoe Sugihara committed Nov 18, 2014
1 parent da76122 commit 61a9650
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 @@ -30,7 +30,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]+)\+([0-9]+\.[0-9])$ ]]; then

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

deb_version=$upstream_version-$downstream_version

elif [[ "$version_tag" =~ ^([0-9]{4}\.[0-9]+)-([0-9]+\.[0-9])-(rc[0-9]+)$ ]]; then
elif [[ "$version_tag" =~ ^([0-9]{4}\.[0-9]+)\+([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 @@ -54,7 +54,7 @@ elif [[ "$version_tag" =~ ^([0-9]{4}\.[0-9]+)-([0-9]+\.[0-9])-(rc[0-9]+)$ ]]; th

deb_version=$upstream_version-$downstream_version~$rc_tag

elif [[ "$version_tag" =~ ^([0-9]{4}\.[0-9]+)-([0-9]+\.[0-9])-(rc[0-9]+.*)$ ]]; then
elif [[ "$version_tag" =~ ^([0-9]{4}\.[0-9]+)\+([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 61a9650

Please sign in to comment.