Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the mac build script to use the global poetry config #70

Merged
merged 1 commit into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tools/build-linux/appimage/run_in_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ PY_VER_MAJOR="3.10" # as it appears in fs paths
PKG2APPIMAGE_COMMIT="a9c85b7e61a3a883f4a35c41c5decb5af88b6b5d"

VERSION=$(git describe --tags --dirty --always)
list_dirty_files
APPIMAGE="$DISTDIR/bitcoin_safe-$VERSION-x86_64.AppImage"

rm -rf "$BUILDDIR"
Expand Down
3 changes: 2 additions & 1 deletion tools/build-mac/make_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ brew install autoconf automake libtool gettext coreutils pkgconfig
# ======================
info "Using Poetry to install local project dependencies"
# Optionally ensure Poetry does not create its own .venv:
poetry config virtualenvs.create false --local
poetry config virtualenvs.create false
# ...But we are already inside a venv, so Poetry *should* install into this environment:
poetry install --with main,build_mac

Expand Down Expand Up @@ -218,6 +218,7 @@ info "Faking timestamps..."
find . -exec sudo touch -t '200101220000' {} + || true

VERSION=$(git describe --tags --dirty --always)
list_dirty_files

info "Running PyInstaller to create macOS .app"
BITCOIN_SAFE_VERSION=$VERSION \
Expand Down
1 change: 1 addition & 0 deletions tools/build-mac/sign_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function DoCodeSignMaybe { # ARGS: infoName fileOrDirName
}

VERSION=$(git describe --tags --dirty --always)
list_dirty_files

DoCodeSignMaybe "app bundle" "dist/${PACKAGE}.app"

Expand Down
1 change: 1 addition & 0 deletions tools/build-wine/build_exe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ set -e
pushd "$WINEPREFIX/drive_c/$NAME_ROOT"

VERSION=$(git describe --tags --dirty --always)
list_dirty_files
info "Last commit: $VERSION"

find -exec touch -h -d '2000-11-11T11:11:11+00:00' {} +
Expand Down
18 changes: 18 additions & 0 deletions tools/build_tools_util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,21 @@ move_and_overwrite() {
return 1
}
}



list_dirty_files() {
# Retrieve the current git version including tags and state
local temp_version=$(git describe --tags --dirty --always)

# Check if the string 'dirty' is in the version
if [[ "$temp_version" == *dirty* ]]; then
warn "Repository is dirty. Listing modified files:"
# List files that are modified but not yet staged for commit
git diff --name-only
# List files that are staged but not yet committed
git diff --name-only --cached
else
info "Repository is clean version: $temp_version"
fi
}