Skip to content

Commit

Permalink
Fix GitHub flow bug (#2809)
Browse files Browse the repository at this point in the history
* Test

* Fix relative path again

* Weird test

---------

Co-authored-by: Jeroen Beckers <dauntless@dauntless.be>
  • Loading branch information
TheDauntless and Jeroen Beckers committed Jul 13, 2024
1 parent cecb758 commit 697006f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
if: github.actor == 'cpholguera' || github.actor == 'sushi2k'
if: github.actor == 'cpholguera' || github.actor == 'sushi2k' || github.actor == 'TheDauntless'
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docgenerator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
repository: "OWASP/owasp-masvs.git"
ref: ${{env.MASVS_VERSION}}
fetch-depth: 1
path: ../owasp-masvs
path: owasp-masvs

- name: Get MASVS Current Commit ID
run: cd owasp-masvs && echo "MASVS_COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
Expand Down
Empty file modified run_web.sh
100644 → 100755
Empty file.
17 changes: 10 additions & 7 deletions src/scripts/structure_masvs.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
echo "$PWD"
if [ ! -d "../owasp-masvs/" ] ; then
echo "Error: Please clone owasp-masvs to same directory as owasp-mastg"
exit
if [ -d "../owasp-masvs/" ] ; then
MASVS_DIR=../owasp-masvs
elif [ ! -d "../owasp-masvs/" ] ; then
MASVS_DIR=./owasp-masvs
else
echo "Error: Please clone owasp-masvs to same directory as owasp-mastg"
exit
fi

mkdir -p docs/MASVS/Intro
mkdir -p docs/MASVS/controls
cp ../owasp-masvs/Document/*.md docs/MASVS
cp $MASVS_DIR/Document/*.md docs/MASVS
mv docs/MASVS/0[1-4]*.md docs/MASVS/Intro
cp ../owasp-masvs/controls/* docs/MASVS/controls
cp $MASVS_DIR/controls/* docs/MASVS/controls

if [[ "$(uname)" == "Darwin" ]]; then
SED="gsed"
Expand All @@ -18,6 +21,6 @@ fi


mkdir -p docs/assets/Images/MASVS
cp ../owasp-masvs/Document/images/* docs/assets/Images/MASVS
cp $MASVS_DIR/Document/images/* docs/assets/Images/MASVS
$SED -i "s#images/#../../../assets/Images/MASVS/#g" docs/MASVS/**/*.md
$SED -i "s#images/#../../assets/Images/MASVS/#g" docs/MASVS/*.md

0 comments on commit 697006f

Please sign in to comment.