build-wine: allow local testing
Before, it was only possible to test commits that are on Github (pull request or merged). Now, changes can be tested locally too. This introduces the risk that a release could be built containing uncommitted changes which by definition breaks deterministic builds. Fortunately, this will always be detected because the version string is created using `git describe --tags --dirty`. Also, retire $TARGET variable because it decouples the build scripts from the commit revision to be built. This is a problem for deterministic builds.
This commit is contained in:
@@ -19,23 +19,7 @@ set -e
|
||||
mkdir -p tmp
|
||||
cd tmp
|
||||
|
||||
if [ -d ./electrum ]; then
|
||||
rm ./electrum -rf
|
||||
fi
|
||||
|
||||
git clone https://github.com/spesmilo/electrum -b master
|
||||
|
||||
pushd electrum
|
||||
if [ ! -z "$1" ]; then
|
||||
# a commit/tag/branch was specified
|
||||
if ! git cat-file -e "$1" 2> /dev/null
|
||||
then # can't find target
|
||||
# try pull requests
|
||||
git config --local --add remote.origin.fetch '+refs/pull/*/merge:refs/remotes/origin/pr/*'
|
||||
git fetch --all
|
||||
fi
|
||||
git checkout $1
|
||||
fi
|
||||
pushd $WINEPREFIX/drive_c/electrum
|
||||
|
||||
# Load electrum-icons and electrum-locale for this release
|
||||
git submodule init
|
||||
@@ -59,11 +43,9 @@ popd
|
||||
find -exec touch -d '2000-11-11T11:11:11+00:00' {} +
|
||||
popd
|
||||
|
||||
rm -rf $WINEPREFIX/drive_c/electrum
|
||||
cp -r electrum $WINEPREFIX/drive_c/electrum
|
||||
cp electrum/LICENCE .
|
||||
cp -r ./electrum/contrib/deterministic-build/electrum-locale/locale $WINEPREFIX/drive_c/electrum/lib/
|
||||
cp ./electrum/contrib/deterministic-build/electrum-icons/icons_rc.py $WINEPREFIX/drive_c/electrum/gui/qt/
|
||||
cp $WINEPREFIX/drive_c/electrum/LICENCE .
|
||||
cp -r $WINEPREFIX/drive_c/electrum/contrib/deterministic-build/electrum-locale/locale $WINEPREFIX/drive_c/electrum/lib/
|
||||
cp $WINEPREFIX/drive_c/electrum/contrib/deterministic-build/electrum-icons/icons_rc.py $WINEPREFIX/drive_c/electrum/gui/qt/
|
||||
|
||||
# Install frozen dependencies
|
||||
$PYTHON -m pip install -r ../../deterministic-build/requirements.txt
|
||||
|
||||
Reference in New Issue
Block a user