build: fail if not inside git clone
related: https://github.com/spesmilo/electrum/issues/8284
This commit is contained in:
@@ -10,6 +10,8 @@ LOCALE="$PROJECT_ROOT"/electrum/locale/
|
|||||||
|
|
||||||
. "$CONTRIB"/build_tools_util.sh
|
. "$CONTRIB"/build_tools_util.sh
|
||||||
|
|
||||||
|
git -C "$PROJECT_ROOT" rev-parse 2>/dev/null || fail "Building outside a git clone is not supported."
|
||||||
|
|
||||||
|
|
||||||
# arguments have been checked in build.sh
|
# arguments have been checked in build.sh
|
||||||
export ELEC_APK_GUI=$1
|
export ELEC_APK_GUI=$1
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ CACHEDIR="$CONTRIB_APPIMAGE/.cache/appimage"
|
|||||||
export DLL_TARGET_DIR="$CACHEDIR/dlls"
|
export DLL_TARGET_DIR="$CACHEDIR/dlls"
|
||||||
PIP_CACHE_DIR="$CONTRIB_APPIMAGE/.cache/pip_cache"
|
PIP_CACHE_DIR="$CONTRIB_APPIMAGE/.cache/pip_cache"
|
||||||
|
|
||||||
|
. "$CONTRIB"/build_tools_util.sh
|
||||||
|
|
||||||
|
git -C "$PROJECT_ROOT" rev-parse 2>/dev/null || fail "Building outside a git clone is not supported."
|
||||||
|
|
||||||
export GCC_STRIP_BINARIES="1"
|
export GCC_STRIP_BINARIES="1"
|
||||||
|
|
||||||
# pinned versions
|
# pinned versions
|
||||||
@@ -22,8 +26,6 @@ PKG2APPIMAGE_COMMIT="a9c85b7e61a3a883f4a35c41c5decb5af88b6b5d"
|
|||||||
VERSION=$(git describe --tags --dirty --always)
|
VERSION=$(git describe --tags --dirty --always)
|
||||||
APPIMAGE="$DISTDIR/electrum-$VERSION-x86_64.AppImage"
|
APPIMAGE="$DISTDIR/electrum-$VERSION-x86_64.AppImage"
|
||||||
|
|
||||||
. "$CONTRIB"/build_tools_util.sh
|
|
||||||
|
|
||||||
rm -rf "$BUILDDIR"
|
rm -rf "$BUILDDIR"
|
||||||
mkdir -p "$APPDIR" "$CACHEDIR" "$PIP_CACHE_DIR" "$DISTDIR" "$DLL_TARGET_DIR"
|
mkdir -p "$APPDIR" "$CACHEDIR" "$PIP_CACHE_DIR" "$DISTDIR" "$DLL_TARGET_DIR"
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ LOCALE="$PROJECT_ROOT/electrum/locale"
|
|||||||
|
|
||||||
. "$CONTRIB"/build_tools_util.sh
|
. "$CONTRIB"/build_tools_util.sh
|
||||||
|
|
||||||
|
git -C "$PROJECT_ROOT" rev-parse 2>/dev/null || fail "Building outside a git clone is not supported."
|
||||||
|
|
||||||
# note that at least py3.7 is needed, to have https://bugs.python.org/issue30693
|
# note that at least py3.7 is needed, to have https://bugs.python.org/issue30693
|
||||||
python3 --version || fail "python interpreter not found"
|
python3 --version || fail "python interpreter not found"
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ export WINE_PYTHON="wine $WINE_PYHOME/python.exe -OO -B"
|
|||||||
|
|
||||||
. "$CONTRIB"/build_tools_util.sh
|
. "$CONTRIB"/build_tools_util.sh
|
||||||
|
|
||||||
|
git -C "$PROJECT_ROOT" rev-parse 2>/dev/null || fail "Building outside a git clone is not supported."
|
||||||
|
|
||||||
info "Clearing $here/build and $here/dist..."
|
info "Clearing $here/build and $here/dist..."
|
||||||
rm "$here"/build/* -rf
|
rm "$here"/build/* -rf
|
||||||
rm "$here"/dist/* -rf
|
rm "$here"/dist/* -rf
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ mkdir -p "$CACHEDIR" "$DLL_TARGET_DIR"
|
|||||||
|
|
||||||
cd "$PROJECT_ROOT"
|
cd "$PROJECT_ROOT"
|
||||||
|
|
||||||
|
git -C "$PROJECT_ROOT" rev-parse 2>/dev/null || fail "Building outside a git clone is not supported."
|
||||||
|
|
||||||
|
|
||||||
which brew > /dev/null 2>&1 || fail "Please install brew from https://brew.sh/ to continue"
|
which brew > /dev/null 2>&1 || fail "Please install brew from https://brew.sh/ to continue"
|
||||||
which xcodebuild > /dev/null 2>&1 || fail "Please install xcode command line tools to continue"
|
which xcodebuild > /dev/null 2>&1 || fail "Please install xcode command line tools to continue"
|
||||||
|
|||||||
Reference in New Issue
Block a user