guix: "Invert" guix-start/guix-check cmd-line argument behaviour, defaults to pwd

This commit is contained in:
UdjinM6 2024-11-12 15:13:51 +03:00
parent 187a4f1a0c
commit 3ac5739e38
No known key found for this signature in database
GPG Key ID: 83592BD1400D58D9
3 changed files with 8 additions and 13 deletions

View File

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

View File

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

View File

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