Skip to content

Commit

Permalink
guix: "Invert" guix-start/guix-check cmd-line argument behaviour,…
Browse files Browse the repository at this point in the history
… defaults to `pwd`
  • Loading branch information
UdjinM6 committed Nov 12, 2024
1 parent 187a4f1 commit 3ac5739
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/guix-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
-v ${{ github.workspace }}/.cache:/home/ubuntu/.cache \
-w /src/dash \
ghcr.io/${{ needs.build-image.outputs.repo-name }}/dashcore-guix-builder:${{ needs.build-image.outputs.image-tag }} && \
docker exec guix-daemon bash -c 'HOSTS=${{ matrix.build_target }} /usr/local/bin/guix-start'
docker exec guix-daemon bash -c 'HOSTS=${{ matrix.build_target }} /usr/local/bin/guix-start /src/dash'
- name: Ensure build passes
run: |
Expand Down
6 changes: 1 addition & 5 deletions contrib/containers/guix/scripts/guix-check
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

set -eo pipefail

if [[ -n "${1}" ]]; then
WORKSPACE_PATH="$1"
else
WORKSPACE_PATH="/src/dash"
fi
WORKSPACE_PATH="${1:-$(pwd)}"

if [[ ! -d "$WORKSPACE_PATH" ]]; then
echo "$0: $WORKSPACE_PATH is not a valid directory, exiting!"
Expand Down
13 changes: 6 additions & 7 deletions contrib/containers/guix/scripts/guix-start
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

set -eo pipefail

if [[ -n "${1}" ]]; then
WORKSPACE_PATH="$1"
else
WORKSPACE_PATH="/src/dash"
fi
WORKSPACE_PATH="${1:-$(pwd)}"

if [[ ! -d "$WORKSPACE_PATH" ]]; then
echo "$0: $WORKSPACE_PATH is not a valid directory, exiting!"
Expand All @@ -25,8 +21,11 @@ if [[ ! -d "${SDK_PATH}/${XCODE_ARCHIVE}" ]]; then
curl -L https://bitcoincore.org/depends-sources/sdks/${XCODE_ARCHIVE}.tar.gz | tar -xz -C "${SDK_PATH}"
fi

# Avoid adding duplicate safe.directory option
git config --global --fixed-value --get safe.directory "${WORKSPACE_PATH}" || git config --global --add safe.directory "${WORKSPACE_PATH}"
# Add safe.directory option only when WORKSPACE_PATH was specified via cmd-line arguments (happens in CI)
if [[ -n "${1}" ]]; then
# Avoid adding duplicates
git config --global --fixed-value --get safe.directory "${WORKSPACE_PATH}" || git config --global --add safe.directory "${WORKSPACE_PATH}"
fi

cd "${WORKSPACE_PATH}"
git status >> /dev/null
Expand Down

0 comments on commit 3ac5739

Please sign in to comment.