Skip to content

Commit

Permalink
updating install logic to also work on circleci
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-jameson committed Nov 15, 2024
1 parent 22df6ca commit 6de97de
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Temporary Assistance for Needy Families (TANF) Data Portal - TDP
# Temporary Assistance for Needy Families (TANF) Data Portal - TDP

Welcome to the project for the New TANF Data Portal, which will replace the legacy TANF Data Reporting System!

Expand Down
19 changes: 10 additions & 9 deletions scripts/git-secrets-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ if [ -d /tmp/git-secrets ]; then
else
echo The command git-secrets is not available, cloning...
git clone [email protected]:awslabs/git-secrets.git /tmp/git-secrets/
if [ ! -f /tmp/git-secrets/git-secrets ]; then
if [ uname -s == "Darwin" ]; then # Mac OSX check
echo "Moving git secrets into PATH"
sudo cp /tmp/git-secrets/git-secrets /usr/local/bin/
git-secrets --install
else
echo "Moving git secrets into PATH"
sudo cp /tmp/git-secrets/git-secrets /usr/sbin/
if [ -f /tmp/git-secrets/git-secrets ]; then
if [[ $(uname -s) == "Darwin" ]]; then # Mac OSX check
gs_path="/usr/local/bin"
else # Linux, we're likely running in CircleCI
gs_path="/usr/sbin"
fi

echo "Moving git secrets into PATH"
sudo cp /tmp/git-secrets/git-secrets $gs_path/
$gs_path/git-secrets --install
else
echo "Git clone failed for git-secrets"
fi
Expand All @@ -39,7 +40,7 @@ if [ $islocal ]; then
git secrets --scan $filename
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "git-secrets-check.sh: Issues found with return code $retVal, please remediate."
echo "git-secrets found issues, prevented commit."
return 1
fi
done
Expand Down

0 comments on commit 6de97de

Please sign in to comment.