From b4528103c59b6d22c3584b65a28a73f60ce8a380 Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Tue, 21 May 2024 10:32:33 +0200 Subject: [PATCH 1/7] Add dugite-native's own custom gitconfig --- resources/posix.gitconfig | 13 +++++++++++++ script/build-macos.sh | 4 ++++ script/build-ubuntu.sh | 4 ++++ 3 files changed, 21 insertions(+) create mode 100644 resources/posix.gitconfig diff --git a/resources/posix.gitconfig b/resources/posix.gitconfig new file mode 100644 index 00000000..42d4cc29 --- /dev/null +++ b/resources/posix.gitconfig @@ -0,0 +1,13 @@ +# This is dugite's own custom system-wide gitconfig file for macOS and Linux. +# On Windows we ship a contained Git environment (minGit) where we can control +# the system-level configuration but on macOS and Linux /etc/gitconfig is used +# as the system-wide configuration file and we're unable to modify it. +# +# So in order to be able to provide our own sane defaults that can be overriden +# by the user's global and local configuration we'll tell Git that this file +# is the system level config (and import the actual system level config) +[include] + path=/etc/gitconfig + +[credential "https://dev.azure.com"] + useHttpPath = true diff --git a/script/build-macos.sh b/script/build-macos.sh index be14a768..971d2f6a 100755 --- a/script/build-macos.sh +++ b/script/build-macos.sh @@ -110,4 +110,8 @@ echo "-- Removing unsupported features" rm "$DESTINATION/libexec/git-core/git-svn" rm "$DESTINATION/libexec/git-core/git-p4" +echo "-- Copying dugite custom system gitconfig" +mkdir "$DESTINATION/etc" +cp "$CURRENT_DIR/../resources/gitconfig" "$DESTINATION/etc/gitconfig" + set +eu diff --git a/script/build-ubuntu.sh b/script/build-ubuntu.sh index bfd2ff5e..5df4add5 100755 --- a/script/build-ubuntu.sh +++ b/script/build-ubuntu.sh @@ -146,6 +146,10 @@ echo "-- Removing unsupported features" rm "$DESTINATION/libexec/git-core/git-svn" rm "$DESTINATION/libexec/git-core/git-p4" +echo "-- Copying dugite custom system gitconfig" +mkdir "$DESTINATION/etc" +cp "$CURRENT_DIR/../resources/gitconfig" "$DESTINATION/etc/gitconfig" + set +eu echo "-- Static linking research" From a49c3b43769026b6461e0bd5900ca788b9577779 Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Tue, 21 May 2024 10:32:43 +0200 Subject: [PATCH 2/7] Set useHttpPath for ADO on Windows --- script/build-win32.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/script/build-win32.sh b/script/build-win32.sh index c493ddce..efaefd66 100755 --- a/script/build-win32.sh +++ b/script/build-win32.sh @@ -94,6 +94,7 @@ git config --file "$SYSTEM_CONFIG" core.symlinks "false" git config --file "$SYSTEM_CONFIG" core.autocrlf "true" git config --file "$SYSTEM_CONFIG" core.fscache "true" git config --file "$SYSTEM_CONFIG" http.sslBackend "schannel" +git config --file "$SYSTEM_CONFIG" credential.https://dev.azure.com.useHttpPath "true" # See https://github.com/desktop/desktop/issues/4817#issuecomment-393241303 # Even though it's not set openssl will auto-discover the one we ship because From dd8d804ad640022382f55d5f4d4f6503baebfb64 Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Tue, 21 May 2024 10:39:31 +0200 Subject: [PATCH 3/7] Doh --- script/build-macos.sh | 2 +- script/build-ubuntu.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/script/build-macos.sh b/script/build-macos.sh index 971d2f6a..30e3e00a 100755 --- a/script/build-macos.sh +++ b/script/build-macos.sh @@ -112,6 +112,6 @@ rm "$DESTINATION/libexec/git-core/git-p4" echo "-- Copying dugite custom system gitconfig" mkdir "$DESTINATION/etc" -cp "$CURRENT_DIR/../resources/gitconfig" "$DESTINATION/etc/gitconfig" +cp "$CURRENT_DIR/../resources/posix.gitconfig" "$DESTINATION/etc/gitconfig" set +eu diff --git a/script/build-ubuntu.sh b/script/build-ubuntu.sh index 5df4add5..563b1270 100755 --- a/script/build-ubuntu.sh +++ b/script/build-ubuntu.sh @@ -148,7 +148,7 @@ rm "$DESTINATION/libexec/git-core/git-p4" echo "-- Copying dugite custom system gitconfig" mkdir "$DESTINATION/etc" -cp "$CURRENT_DIR/../resources/gitconfig" "$DESTINATION/etc/gitconfig" +cp "$CURRENT_DIR/../resources/posix.gitconfig" "$DESTINATION/etc/gitconfig" set +eu From 4b52a7b8bd71e3dc9b42780fbd6c3969764e6e7f Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Tue, 21 May 2024 10:43:55 +0200 Subject: [PATCH 4/7] Bump some old actions --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b336845..753466c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: name: Shellcheck runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Run ShellCheck run: | sudo apt-get install shellcheck @@ -82,7 +82,7 @@ jobs: # Delete the command line tools to make sure they don't get our builds # messed up with macOS SDK 11 stuff. sudo rm -rf /Library/Developer/CommandLineTools - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: recursive # Needed for script/package.sh to work @@ -146,7 +146,7 @@ jobs: TARGET_PLATFORM: ${{ matrix.targetPlatform }} TARGET_ARCH: ${{ matrix.arch }} - name: Upload output artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: dugite-native-${{ matrix.targetPlatform }}-${{ matrix.arch }}-output @@ -161,10 +161,10 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Download all artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: path: './artifacts' From e49dc44039ef833f4c6272e0ede12d7f32087686 Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Tue, 21 May 2024 10:59:58 +0200 Subject: [PATCH 5/7] v3 maybe? --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 753466c8..c5fcd157 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,7 +82,7 @@ jobs: # Delete the command line tools to make sure they don't get our builds # messed up with macOS SDK 11 stuff. sudo rm -rf /Library/Developer/CommandLineTools - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: submodules: recursive # Needed for script/package.sh to work From 2e9d10d2ff10f8fb60f22c1e7444f3940aa00274 Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Tue, 21 May 2024 11:07:35 +0200 Subject: [PATCH 6/7] v3 then? --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5fcd157..9c2bed76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -146,7 +146,7 @@ jobs: TARGET_PLATFORM: ${{ matrix.targetPlatform }} TARGET_ARCH: ${{ matrix.arch }} - name: Upload output artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 with: name: dugite-native-${{ matrix.targetPlatform }}-${{ matrix.arch }}-output From aa944b55d63188e1af095f430299375cb9db425a Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Tue, 21 May 2024 11:10:37 +0200 Subject: [PATCH 7/7] We can run node20 on macos --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c2bed76..43e696e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,7 +89,7 @@ jobs: fetch-depth: 0 - name: Install go if: matrix.targetPlatform == 'macOS' - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 - name: Install dependencies run: npm install - name: Check formatting