Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
build locally : secrets baseline on linux should not contain a timestamp
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Cobbett <[email protected]>
  • Loading branch information
techcobweb committed Oct 16, 2024
1 parent 5bb3aa7 commit d07361e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion build-locally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,21 @@ function check_secrets {
error "Not all secrets found have been audited"
exit 1
fi
sed -i '' '/[ ]*"generated_at": ".*",/d' .secrets.baseline
success "secrets audit complete"

h2 "Removing the timestamp from the secrets baseline file so it doesn't always cause a git change."
mkdir -p temp
rc=$?
check_exit_code $rc "Failed to create a temporary folder"
cat .secrets.baseline | grep -v "generated_at" > temp/.secrets.baseline.temp
rc=$?
check_exit_code $rc "Failed to create a temporary file with no timestamp inside"
mv temp/.secrets.baseline.temp .secrets.baseline
rc=$?
check_exit_code $rc "Failed to overwrite the secrets baseline with one containing no timestamp inside."
success "secrets baseline timestamp content has been removed ok"
}

# #------------------------------------------------------------------------------------
# h2 "Packaging the javadoc into a docker file"
# #------------------------------------------------------------------------------------
Expand Down

0 comments on commit d07361e

Please sign in to comment.