mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Make aware of branches and only create source tarball once.
This commit is contained in:
parent
e404d42f60
commit
39ced1ba55
@ -3,26 +3,41 @@
|
|||||||
## 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.
|
||||||
##
|
##
|
||||||
## The gnupg key for "build@ethdev.com" has to be present in order to sign
|
## If no argument is given, creates a package for the develop branch
|
||||||
|
## and uploads it to the ethereum/ethereum-dev ppa.
|
||||||
|
##
|
||||||
|
## If an argument is given, it is used as a tag and the resulting package
|
||||||
|
## is uploaded to the ethereum/ethereum ppa.
|
||||||
|
##
|
||||||
|
## The gnupg key for "builds@ethereum.org" has to be present in order to sign
|
||||||
## the package.
|
## the package.
|
||||||
##
|
##
|
||||||
## It will clone the Solidity git from github, determine the version,
|
## It will clone the Solidity git from github, determine the version,
|
||||||
## create a source archive and push it to the ubuntu ppa servers.
|
## create a source archive and push it to the ubuntu ppa servers.
|
||||||
##
|
##
|
||||||
## A version, tag or commit hash can be given as argument.
|
|
||||||
##
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
set -ev
|
set -ev
|
||||||
|
|
||||||
|
if [ -z "$1" ]
|
||||||
|
then
|
||||||
|
branch=develop
|
||||||
|
else
|
||||||
|
branch=$1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$branch" = develop ]
|
||||||
|
pparepo=ethereum/ethereum-dev
|
||||||
|
ppafilesurl=https://launchpad.net/~ethereum/+archive/ubuntu/ethereum-dev/+files
|
||||||
|
else
|
||||||
|
pparepo=ethereum/ethereum
|
||||||
|
ppafilesurl=https://launchpad.net/~ethereum/+archive/ubuntu/ethereum/+files
|
||||||
|
fi
|
||||||
|
|
||||||
keyid=703F83D0
|
keyid=703F83D0
|
||||||
email=builds@ethereum.org
|
email=builds@ethereum.org
|
||||||
packagename=solc
|
packagename=solc
|
||||||
|
|
||||||
# TODO determine whether to use dev or not
|
|
||||||
pparepo=ethereum/ethereum-dev
|
|
||||||
ppafilesurl=https://launchpad.net/~ethereum/+archive/ubuntu/ethereum-dev/+files
|
|
||||||
|
|
||||||
for distribution in trusty vivid wily xenial yakkety
|
for distribution in trusty vivid wily xenial yakkety
|
||||||
do
|
do
|
||||||
cd /tmp/
|
cd /tmp/
|
||||||
@ -30,7 +45,7 @@ mkdir $distribution
|
|||||||
cd $distribution
|
cd $distribution
|
||||||
|
|
||||||
# Fetch source
|
# Fetch source
|
||||||
git clone --recursive https://github.com/ethereum/solidity.git -b $1
|
git clone --recursive https://github.com/ethereum/solidity.git -b "$branch"
|
||||||
mv solidity solc
|
mv solidity solc
|
||||||
|
|
||||||
# Determine version
|
# Determine version
|
||||||
@ -40,11 +55,23 @@ commithash=`git rev-parse --short HEAD`
|
|||||||
committimestamp=`git show --format=%ci HEAD | head -n 1`
|
committimestamp=`git show --format=%ci HEAD | head -n 1`
|
||||||
commitdate=`git show --format=%ci HEAD | head -n 1 | cut - -b1-10`
|
commitdate=`git show --format=%ci HEAD | head -n 1 | cut - -b1-10`
|
||||||
|
|
||||||
# TODO determine if we are on a "release" (tagged commit?) and push to non-dev in that case
|
|
||||||
# TODO store the commit hash in a file so that the build info mechanism can pick it up even without git
|
# TODO store the commit hash in a file so that the build info mechanism can pick it up even without git
|
||||||
|
|
||||||
debversion="$version-nightly-$commitdate-ffi-$commithash"
|
if [ $branch = develop]
|
||||||
tar --mtime "$committimestamp" --exclude .git -czf ../${packagename}_${debversion}.orig.tar.gz .
|
then
|
||||||
|
debversion="$version-nightly-$commitdate-$commithash"
|
||||||
|
else
|
||||||
|
debversion="$version"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# gzip will create different tars all the time and we are not allowed
|
||||||
|
# to upload the same file twice with different contents, so we only
|
||||||
|
# create it once.
|
||||||
|
if [ -n -e /tmp/${packagename}_${debversion}.orig.tar.gz ]
|
||||||
|
then
|
||||||
|
tar --exclude .git -czf /tmp/${packagename}_${debversion}.orig.tar.gz .
|
||||||
|
fi
|
||||||
|
cp /tmp/${packagename}_${debversion}.orig.tar.gz ../
|
||||||
|
|
||||||
# Create debian package information
|
# Create debian package information
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user