mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Dashify gitian-build.sh
This commit is contained in:
parent
fc34ec4b3f
commit
40202ef819
@ -13,7 +13,7 @@ osx=true
|
||||
SIGNER=
|
||||
VERSION=
|
||||
commit=false
|
||||
url=https://github.com/bitcoin/bitcoin
|
||||
url=https://github.com/dashpay/dash
|
||||
proc=2
|
||||
mem=2000
|
||||
lxc=true
|
||||
@ -27,7 +27,7 @@ commitFiles=true
|
||||
read -d '' usage <<- EOF
|
||||
Usage: $scriptName [-c|u|v|b|s|B|o|h|j|m|] signer version
|
||||
|
||||
Run this script from the directory containing the bitcoin, gitian-builder, gitian.sigs, and bitcoin-detached-sigs.
|
||||
Run this script from the directory containing the dash, gitian-builder, gitian.sigs, and dash-detached-sigs.
|
||||
|
||||
Arguments:
|
||||
signer GPG signer to sign each build assert file
|
||||
@ -35,7 +35,7 @@ version Version number, commit, or branch to build. If building a commit or bra
|
||||
|
||||
Options:
|
||||
-c|--commit Indicate that the version argument is for a commit or branch
|
||||
-u|--url Specify the URL of the repository. Default is https://github.com/bitcoin/bitcoin
|
||||
-u|--url Specify the URL of the repository. Default is https://github.com/dashpay/dash
|
||||
-v|--verify Verify the gitian build
|
||||
-b|--build Do a gitiain build
|
||||
-s|--sign Make signed binaries for Windows and Mac OSX
|
||||
@ -228,8 +228,8 @@ echo ${COMMIT}
|
||||
if [[ $setup = true ]]
|
||||
then
|
||||
sudo apt-get install ruby apache2 git apt-cacher-ng python-vm-builder qemu-kvm qemu-utils
|
||||
git clone https://github.com/bitcoin-core/gitian.sigs.git
|
||||
git clone https://github.com/bitcoin-core/bitcoin-detached-sigs.git
|
||||
git clone https://github.com/dashpay/gitian.sigs.git
|
||||
git clone https://github.com/dashpay/dash-detached-sigs.git
|
||||
git clone https://github.com/devrandom/gitian-builder.git
|
||||
pushd ./gitian-builder
|
||||
if [[ -n "$USE_LXC" ]]
|
||||
@ -243,7 +243,7 @@ then
|
||||
fi
|
||||
|
||||
# Set up build
|
||||
pushd ./bitcoin
|
||||
pushd ./dash
|
||||
git fetch
|
||||
git checkout ${COMMIT}
|
||||
popd
|
||||
@ -252,7 +252,7 @@ popd
|
||||
if [[ $build = true ]]
|
||||
then
|
||||
# Make output folder
|
||||
mkdir -p ./bitcoin-binaries/${VERSION}
|
||||
mkdir -p ./dash-binaries/${VERSION}
|
||||
|
||||
# Build Dependencies
|
||||
echo ""
|
||||
@ -262,7 +262,7 @@ then
|
||||
mkdir -p inputs
|
||||
wget -N -P inputs $osslPatchUrl
|
||||
wget -N -P inputs $osslTarUrl
|
||||
make -C ../bitcoin/depends download SOURCES_PATH=`pwd`/cache/common
|
||||
make -C ../dash/depends download SOURCES_PATH=`pwd`/cache/common
|
||||
|
||||
# Linux
|
||||
if [[ $linux = true ]]
|
||||
@ -270,9 +270,9 @@ then
|
||||
echo ""
|
||||
echo "Compiling ${VERSION} Linux"
|
||||
echo ""
|
||||
./bin/gbuild -j ${proc} -m ${mem} --commit bitcoin=${COMMIT} --url bitcoin=${url} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
|
||||
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-linux --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
|
||||
mv build/out/bitcoin-*.tar.gz build/out/src/bitcoin-*.tar.gz ../bitcoin-binaries/${VERSION}
|
||||
./bin/gbuild -j ${proc} -m ${mem} --commit dash=${COMMIT} --url dash=${url} ../dash/contrib/gitian-descriptors/gitian-linux.yml
|
||||
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-linux --destination ../gitian.sigs/ ../dash/contrib/gitian-descriptors/gitian-linux.yml
|
||||
mv build/out/dash-*.tar.gz build/out/src/dash-*.tar.gz ../dash-binaries/${VERSION}
|
||||
fi
|
||||
# Windows
|
||||
if [[ $windows = true ]]
|
||||
@ -280,10 +280,10 @@ then
|
||||
echo ""
|
||||
echo "Compiling ${VERSION} Windows"
|
||||
echo ""
|
||||
./bin/gbuild -j ${proc} -m ${mem} --commit bitcoin=${COMMIT} --url bitcoin=${url} ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
|
||||
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-win-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
|
||||
mv build/out/bitcoin-*-win-unsigned.tar.gz inputs/bitcoin-win-unsigned.tar.gz
|
||||
mv build/out/bitcoin-*.zip build/out/bitcoin-*.exe ../bitcoin-binaries/${VERSION}
|
||||
./bin/gbuild -j ${proc} -m ${mem} --commit dash=${COMMIT} --url dash=${url} ../dash/contrib/gitian-descriptors/gitian-win.yml
|
||||
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-win-unsigned --destination ../gitian.sigs/ ../dash/contrib/gitian-descriptors/gitian-win.yml
|
||||
mv build/out/dash-*-win-unsigned.tar.gz inputs/dash-win-unsigned.tar.gz
|
||||
mv build/out/dash-*.zip build/out/dash-*.exe ../dash-binaries/${VERSION}
|
||||
fi
|
||||
# Mac OSX
|
||||
if [[ $osx = true ]]
|
||||
@ -291,10 +291,10 @@ then
|
||||
echo ""
|
||||
echo "Compiling ${VERSION} Mac OSX"
|
||||
echo ""
|
||||
./bin/gbuild -j ${proc} -m ${mem} --commit bitcoin=${COMMIT} --url bitcoin=${url} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
|
||||
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-osx-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
|
||||
mv build/out/bitcoin-*-osx-unsigned.tar.gz inputs/bitcoin-osx-unsigned.tar.gz
|
||||
mv build/out/bitcoin-*.tar.gz build/out/bitcoin-*.dmg ../bitcoin-binaries/${VERSION}
|
||||
./bin/gbuild -j ${proc} -m ${mem} --commit dash=${COMMIT} --url dash=${url} ../dash/contrib/gitian-descriptors/gitian-osx.yml
|
||||
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-osx-unsigned --destination ../gitian.sigs/ ../dash/contrib/gitian-descriptors/gitian-osx.yml
|
||||
mv build/out/dash-*-osx-unsigned.tar.gz inputs/dash-osx-unsigned.tar.gz
|
||||
mv build/out/dash-*.tar.gz build/out/dash-*.dmg ../dash-binaries/${VERSION}
|
||||
fi
|
||||
popd
|
||||
|
||||
@ -321,27 +321,27 @@ then
|
||||
echo ""
|
||||
echo "Verifying v${VERSION} Linux"
|
||||
echo ""
|
||||
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-linux ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
|
||||
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-linux ../dash/contrib/gitian-descriptors/gitian-linux.yml
|
||||
# Windows
|
||||
echo ""
|
||||
echo "Verifying v${VERSION} Windows"
|
||||
echo ""
|
||||
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-win-unsigned ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
|
||||
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-win-unsigned ../dash/contrib/gitian-descriptors/gitian-win.yml
|
||||
# Mac OSX
|
||||
echo ""
|
||||
echo "Verifying v${VERSION} Mac OSX"
|
||||
echo ""
|
||||
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-unsigned ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
|
||||
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-unsigned ../dash/contrib/gitian-descriptors/gitian-osx.yml
|
||||
# Signed Windows
|
||||
echo ""
|
||||
echo "Verifying v${VERSION} Signed Windows"
|
||||
echo ""
|
||||
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-signed ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
|
||||
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-signed ../dash/contrib/gitian-descriptors/gitian-osx-signer.yml
|
||||
# Signed Mac OSX
|
||||
echo ""
|
||||
echo "Verifying v${VERSION} Signed Mac OSX"
|
||||
echo ""
|
||||
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-signed ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
|
||||
./bin/gverify -v -d ../gitian.sigs/ -r ${VERSION}-osx-signed ../dash/contrib/gitian-descriptors/gitian-osx-signer.yml
|
||||
popd
|
||||
fi
|
||||
|
||||
@ -356,10 +356,10 @@ then
|
||||
echo ""
|
||||
echo "Signing ${VERSION} Windows"
|
||||
echo ""
|
||||
./bin/gbuild -i --commit signature=${COMMIT} ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
|
||||
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-win-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win-signer.yml
|
||||
mv build/out/bitcoin-*win64-setup.exe ../bitcoin-binaries/${VERSION}
|
||||
mv build/out/bitcoin-*win32-setup.exe ../bitcoin-binaries/${VERSION}
|
||||
./bin/gbuild -i --commit signature=${COMMIT} ../dash/contrib/gitian-descriptors/gitian-win-signer.yml
|
||||
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-win-signed --destination ../gitian.sigs/ ../dash/contrib/gitian-descriptors/gitian-win-signer.yml
|
||||
mv build/out/dash-*win64-setup.exe ../dash-binaries/${VERSION}
|
||||
mv build/out/dash-*win32-setup.exe ../dash-binaries/${VERSION}
|
||||
fi
|
||||
# Sign Mac OSX
|
||||
if [[ $osx = true ]]
|
||||
@ -367,9 +367,9 @@ then
|
||||
echo ""
|
||||
echo "Signing ${VERSION} Mac OSX"
|
||||
echo ""
|
||||
./bin/gbuild -i --commit signature=${COMMIT} ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
|
||||
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-osx-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
|
||||
mv build/out/bitcoin-osx-signed.dmg ../bitcoin-binaries/${VERSION}/bitcoin-${VERSION}-osx.dmg
|
||||
./bin/gbuild -i --commit signature=${COMMIT} ../dash/contrib/gitian-descriptors/gitian-osx-signer.yml
|
||||
./bin/gsign -p $signProg --signer $SIGNER --release ${VERSION}-osx-signed --destination ../gitian.sigs/ ../dash/contrib/gitian-descriptors/gitian-osx-signer.yml
|
||||
mv build/out/dash-osx-signed.dmg ../dash-binaries/${VERSION}/dash-${VERSION}-osx.dmg
|
||||
fi
|
||||
popd
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user