Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Go and OSSF Scorecard when already installed patch #1983

Merged
merged 2 commits into from
Sep 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions scripts/install/workers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,23 @@ do

done

curl -fsSLo- https://s.id/golang-linux | bash

export GOROOT="/home/$USER/go"
export GOPATH="/home/$USER/go/packages"
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
if [ -f "/usr/local/bin/go" ] || [ -f "/usr/bin/go" ] || [ -f "/snap/bin/go" ]; then
echo "found go!"
else
echo "Installing go!"
curl -fsSLo- https://s.id/golang-linux | bash
export GOROOT="/home/$USER/go"
export GOPATH="/home/$USER/go/packages"
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
fi

if [ -d "$HOME/scorecard" ]; then
echo " Scorecard already exists, skipping cloning ..."
echo " Updating Scorecard ... "
CURRENT_DIR=$PWD;
cd $HOME/scorecard;
git pull;
git pull;
go mod tidy;
go build;
echo "Scorecard build done."
cd $CURRENT_DIR
Expand Down