diff --git a/package.sh b/package.sh index 10d596b..c034f8d 100755 --- a/package.sh +++ b/package.sh @@ -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" @@ -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]} @@ -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]}