Change the way release_ppa.sh treats branches.

Only release branch is treated release branch,
and everything else is treated a development branch.
This commit is contained in:
Christian Parpart 2019-07-15 12:45:36 +02:00
parent 508cf66da2
commit cb5df90251
No known key found for this signature in database
GPG Key ID: 19BC8DD20312C929

View File

@ -3,11 +3,11 @@
## This is used to package .deb packages and upload them to the launchpad ## This is used to package .deb packages and upload them to the launchpad
## ppa servers for building. ## ppa servers for building.
## ##
## If no argument is given, creates a package for the develop branch ## You can pass a branch name as argument to this script (which, if no argument is given,
## and uploads it to the ethereum/ethereum-dev ppa. ## will default to "develop").
## ##
## If an argument is given, it is used as a tag and the resulting package ## If the gien branch is "release", the resulting package will be uplaoded to
## is uploaded to the ethereum/ethereum ppa. ## ethereum/ethereum PPA, or ethereum/ethereum-dev PPA otherwise.
## ##
## The gnupg key for "builds@ethereum.org" has to be present in order to sign ## The gnupg key for "builds@ethereum.org" has to be present in order to sign
## the package. ## the package.
@ -47,6 +47,10 @@ else
branch=$1 branch=$1
fi fi
is_release() {
[[ "${branch}" = "release" ]] || [[ "${branch}" =~ ^v[0-9]+(\.[0-9])*$ ]]
}
keyid=70D110489D66E2F6 keyid=70D110489D66E2F6
email=builds@ethereum.org email=builds@ethereum.org
packagename=solc packagename=solc
@ -55,7 +59,7 @@ static_build_distribution=cosmic
DISTRIBUTIONS="bionic cosmic disco" DISTRIBUTIONS="bionic cosmic disco"
if [ branch != develop ] if is_release
then then
DISTRIBUTIONS="$DISTRIBUTIONS STATIC" DISTRIBUTIONS="$DISTRIBUTIONS STATIC"
fi fi
@ -73,11 +77,11 @@ then
SMTDEPENDENCY="" SMTDEPENDENCY=""
CMAKE_OPTIONS="-DSOLC_LINK_STATIC=On" CMAKE_OPTIONS="-DSOLC_LINK_STATIC=On"
else else
if [ "$branch" = develop ] if is_release
then then
pparepo=ethereum-dev
else
pparepo=ethereum pparepo=ethereum
else
pparepo=ethereum-dev
fi fi
SMTDEPENDENCY="libcvc4-dev, SMTDEPENDENCY="libcvc4-dev,
" "
@ -101,12 +105,12 @@ committimestamp=$(git show --format=%ci HEAD | head -n 1)
commitdate=$(git show --format=%ci HEAD | head -n 1 | cut - -b1-10 | sed -e 's/-0?/./' | sed -e 's/-0?/./') commitdate=$(git show --format=%ci HEAD | head -n 1 | cut - -b1-10 | sed -e 's/-0?/./' | sed -e 's/-0?/./')
echo "$commithash" > commit_hash.txt echo "$commithash" > commit_hash.txt
if [ $branch = develop ] if is_release
then then
debversion="$version~develop-$commitdate-$commithash"
else
debversion="$version" debversion="$version"
echo -n > prerelease.txt # proper release echo -n > prerelease.txt # proper release
else
debversion="$version~develop-$commitdate-$commithash"
fi fi
# gzip will create different tars all the time and we are not allowed # gzip will create different tars all the time and we are not allowed