From e1eb70b602faaf8712ddb44322a84e659f26d0ad Mon Sep 17 00:00:00 2001 From: Brian Beyer Date: Mon, 11 Jun 2018 08:20:56 -0500 Subject: [PATCH] Only commit docs for non-PR branches because permissions (#246) * attempt to skip doc generation on pull request branches * try different commenting style * Generate docs from job=validate_atomics_generate_docs branch=circle-for-forks --- .circleci/config.yml | 8 +++++--- atomics/T1083/T1083.md | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f622fd5f..50897708 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,13 +36,15 @@ jobs: if git diff-index --quiet HEAD -- ; then echo "Not committing documentation because there are no changes" - elif [[ "${CIRCLE_BRANCH}" == "master" ]]; then - echo "Not committing documentation because we are on master and doc changes should be part of pull request branches" + #elif [[ "${CIRCLE_BRANCH}" == "master" ]]; then + # echo "Not committing documentation because we are on master and doc changes should be part of pull request branches" + elif [[ $(echo "$CIRCLE_BRANCH" | grep -c "pull") -gt 0 ]]; then + echo "Not committing documentation because we are on a pull request branch that we don't have push permissions to" else git config credential.helper 'cache --timeout=120' git config user.email "" git config user.name "CircleCI Atomic Red Team doc generator" - + git add atomics git commit -am "Generate docs from job=$CIRCLE_JOB branch=$CIRCLE_BRANCH" git push -u origin $CIRCLE_BRANCH diff --git a/atomics/T1083/T1083.md b/atomics/T1083/T1083.md index b1da1314..d14bc0a4 100644 --- a/atomics/T1083/T1083.md +++ b/atomics/T1083/T1083.md @@ -45,9 +45,9 @@ dir /s c:\ >> %temp%\download dir /s "c:\Documents and Settings" >> %temp%\download dir /s "c:\Program Files\" >> %temp%\download dir /s d:\ >> %temp%\download -dir "%systemdrive%\Users\*.*" -dir "%userprofile%\AppData\Roaming\Microsoft\Windows\Recent\*.*" -dir "%userprofile%\Desktop\*.*" +dir "%systemdrive%\Users\*.*" >> %temp%\download +dir "%userprofile%\AppData\Roaming\Microsoft\Windows\Recent\*.*" >> %temp%\download +dir "%userprofile%\Desktop\*.*" >> %temp%\download tree /F >> %temp%\download ```