Browse Source

build: fail if not inside git clone

related: https://github.com/spesmilo/electrum/issues/8284
master
SomberNight 3 years ago
parent
commit
f25e384654
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 2
      contrib/android/make_apk.sh
  2. 6
      contrib/build-linux/appimage/make_appimage.sh
  3. 2
      contrib/build-linux/sdist/make_sdist.sh
  4. 2
      contrib/build-wine/make_win.sh
  5. 2
      contrib/osx/make_osx.sh

2
contrib/android/make_apk.sh

@ -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."
# arguments have been checked in build.sh
export ELEC_APK_GUI=$1

6
contrib/build-linux/appimage/make_appimage.sh

@ -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"

2
contrib/build-linux/sdist/make_sdist.sh vendored

@ -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"

2
contrib/build-wine/make_win.sh

@ -35,6 +35,8 @@ export WINE_PYTHON="wine $WINE_PYHOME/python.exe -OO -B"
. "$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..."
rm "$here"/build/* -rf
rm "$here"/dist/* -rf

2
contrib/osx/make_osx.sh

@ -25,6 +25,8 @@ mkdir -p "$CACHEDIR" "$DLL_TARGET_DIR"
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 xcodebuild > /dev/null 2>&1 || fail "Please install xcode command line tools to continue"

Loading…
Cancel
Save