Skip to content

Commit

Permalink
Merge pull request #1983 from chaoss/spg-patch-go
Browse files Browse the repository at this point in the history
Updating Go and OSSF Scorecard when already installed patch
  • Loading branch information
sgoggins committed Sep 11, 2022
2 parents 7f1fc3b + 3a3e60a commit f9d5a2e
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions scripts/install/workers.sh
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

0 comments on commit f9d5a2e

Please sign in to comment.