Skip to content

Commit

Permalink
www: Relax setup script check on root.
Browse files Browse the repository at this point in the history
  • Loading branch information
xlauko committed Nov 16, 2023
1 parent 5d1ba7c commit c4824fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Build VAST Doc
run: cmake --build --preset ninja-rel --target vast-doc

- name: Build Website
- name: Build Pages
run: |
sh ./www/setup.sh _site ./builds/ninja-multi-default/
Expand Down
13 changes: 2 additions & 11 deletions www/setup.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
#!/usr/bin/env bash

vast_repo="git@github.com:trailofbits/vast.git"

# Check if the current directory is a Git repository
if [ -d .git ] || git rev-parse --git-dir > /dev/null 2>&1; then
# Check if it's the VAST repository
actual_repo=$(git config --get remote.origin.url)
if [ "$actual_repo" != "$vast_repo" ]; then
echo "Error: Script must be run from the root of VAST repository."
exit 1
fi
else
echo "Error: Script must be run from the root of VAST repository."
if !( [ -d .git ] || git rev-parse --git-dir > /dev/null 2>&1 ); then
echo "Error: Script must be run from the root of repository."
exit 1
fi

Expand Down

0 comments on commit c4824fd

Please sign in to comment.