build: fail if not inside git clone
related: https://github.com/spesmilo/electrum/issues/8284
This commit is contained in:
@@ -12,6 +12,10 @@ CACHEDIR="$CONTRIB_APPIMAGE/.cache/appimage"
|
||||
export DLL_TARGET_DIR="$CACHEDIR/dlls"
|
||||
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"
|
||||
|
||||
# pinned versions
|
||||
@@ -22,8 +26,6 @@ PKG2APPIMAGE_COMMIT="a9c85b7e61a3a883f4a35c41c5decb5af88b6b5d"
|
||||
VERSION=$(git describe --tags --dirty --always)
|
||||
APPIMAGE="$DISTDIR/electrum-$VERSION-x86_64.AppImage"
|
||||
|
||||
. "$CONTRIB"/build_tools_util.sh
|
||||
|
||||
rm -rf "$BUILDDIR"
|
||||
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
|
||||
|
||||
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
|
||||
python3 --version || fail "python interpreter not found"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user