From 68ff9732aec4a91994797f6f8bfd0107800a3ef5 Mon Sep 17 00:00:00 2001 From: Leon Wilzer Date: Wed, 14 Feb 2024 01:22:33 +0100 Subject: [PATCH] some small fixes --- .drone.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 57ea985..67c03ef 100644 --- a/.drone.yml +++ b/.drone.yml @@ -133,21 +133,24 @@ steps: - chmod 700 -R "$${HOME}/.ssh" - gpg-agent --daemon - - echo "$GPG_PRIVKEY" > /tmp/private.key - - gpg --batch --pinentry-mode loopback --passphrase '$GPG_PASSPHRASE' --import /tmp/private.key >> /tmp/import.sh || exit 2 + # the git config gpg.program absolutely despises anything other than a path, including additional arguments. + # so we just put it into it's own shell script and use that later - echo "#!/bin/sh" >> /tmp/gpg.sh - echo gpg --batch --pinentry-mode loopback --passphrase '$GPG_PASSPHRASE' \$@ >> /tmp/gpg.sh - chmod 777 /tmp/gpg.sh + - echo "$GPG_PRIVKEY" > /tmp/private.key + - /tmp/gpg.sh --import /tmp/private.key >> /tmp/import.sh || exit 2 + - git config --local user.name "WANessa" - git config --local user.email "$GIT_EMAIL_ADDRESS" - git config --local user.signingkey "$GPG_PUBKEY_ID" - - git config --local gpg.program "/tmp/gpg.sh" + - git config --local gpg.program "/tmp/gpg.sh" # see above comment # Uncomment below line for ssh debugging # - git config core.sshCommand '/usr/bin/ssh -v' - git remote add ssh "$DRONE_GIT_SSH_URL" - - GIT_COMMITTER_NAME="WANessa" GIT_COMMITTER_EMAIL="$GIT_EMAIL_ADDRESS" git commit --author "$DRONE_COMMIT_AUTHOR_NAME <$DRONE_COMMIT_AUTHOR_EMAIL>" -S -a -m "rustfmt" ; cat /tmp/log #|| exit 3 + - GIT_COMMITTER_NAME="WANessa" GIT_COMMITTER_EMAIL="$GIT_EMAIL_ADDRESS" git commit --author "$DRONE_COMMIT_AUTHOR_NAME <$DRONE_COMMIT_AUTHOR_EMAIL>" -S -a -m "rustfmt" - git push ssh environment: -- 2.45.2