From f6d252d4a4bc1d7aa56654604600861d7ba31aa8 Mon Sep 17 00:00:00 2001 From: Daniel Donenfeld Date: Wed, 13 Feb 2019 11:50:02 -0800 Subject: [PATCH] Start updating asm process to be safe with parallel jobs. Push asm for each Job into its own branch --- appveyor.yml | 6 ------ push_asm.bat | 13 ++++++++++++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 3b5f6f6..5a401c0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -131,13 +131,7 @@ test_script: - ctest -j2 on_success: - - git config --global credential.helper store - - ps: Add-Content "$HOME\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n" - - git config --global user.email "dadonenf@microsoft.com" - - git config --global user.name "Daniel Donenfeld" - - git config --global core.autocrlf false - cd %APPVEYOR_BUILD_FOLDER% - push_asm.bat - deploy: off diff --git a/push_asm.bat b/push_asm.bat index be4ec8d..b021d2c 100644 --- a/push_asm.bat +++ b/push_asm.bat @@ -1,4 +1,15 @@ +git config --global credential.helper store +powershell -command 'Add-Content "$HOME\.git-credentials" "https://$($env:access_token):x-oauth-basic@github.com`n"' > nul 2>&1 +git config --global user.email "dadonenf@microsoft.com" +git config --global user.name "Daniel Donenfeld" +git config --global core.autocrlf false + +REM Get branch to check asm into git checkout %APPVEYOR_REPO_BRANCH% +git checkout -b asm/%APPVEYOR_REPO_COMMIT%/appveyor-%APPVEYOR_JOB_NUMBER% + +REM Check asm into the branch git add "asm/*" git status -git diff-index --cached --quiet --exit-code HEAD || (git commit -m "[skip ci] Update ASM for %ASM_FOLDER%" && git push) +git diff-index --cached --quiet --exit-code HEAD || git commit -m "[skip ci] Update ASM for %ASM_FOLDER%" +git push \ No newline at end of file