Skip to content

Commit

Permalink
fixed some lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Nik Ogura committed Mar 8, 2019
1 parent 7d65fe9 commit c251680
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions cmd/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ Publish will upload your binaries to wherever it is you've configured them to go
}

meta, err := gomason.ReadMetadata("metadata.json")
if err != nil {
log.Fatalf("failed to read metadata: %s", err)
}

err = gomason.Checkout(gopath, meta, branch, verbose)
if err != nil {
Expand Down
3 changes: 3 additions & 0 deletions cmd/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ Signing sorta implies something to sign, which in turn, implies that it built, w
}

meta, err := gomason.ReadMetadata("metadata.json")
if err != nil {
log.Fatalf("failed to read metadata: %s", err)
}

err = gomason.Checkout(gopath, meta, branch, verbose)
if err != nil {
Expand Down
3 changes: 3 additions & 0 deletions cmd/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ Sometimes you need the benefits of a full system here. Now. Right at your fing
}

meta, err := gomason.ReadMetadata("metadata.json")
if err != nil {
log.Fatalf("failed to read metadata: %s", err)
}

err = gomason.Checkout(gopath, meta, branch, verbose)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions pkg/gomason/gomason.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"strings"
)

// VERSION is the current gomason version
const VERSION = "2.5.5"

// Metadata type to represent the metadata.json file
Expand Down
2 changes: 1 addition & 1 deletion pkg/gomason/signing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Expire-Date: 0
err = SignBinary(meta, binary, true)
if err != nil {
err = errors.Wrap(err, "failed to sign binary")
log.Printf("Failed to sign binary %s", binary)
log.Printf("Failed to sign binary %s: %s", binary, err)
t.Fail()
}

Expand Down
2 changes: 1 addition & 1 deletion pre-commit-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

METADATA_VERSION=$(grep version metadata.json | awk '{print $2}' | sed 's/[",]//g')

CODE_VERSION=$(grep VERSION pkg/gomason/gomason.go | awk '{print$4}' | sed 's/"//g')
CODE_VERSION=$(grep VERSION pkg/gomason/gomason.go | awk '{print$4}' | sed 's/"//g' | grep -v the)

if [[ ${METADATA_VERSION} != ${CODE_VERSION} ]]; then
echo "Versions do not match!"
Expand Down

0 comments on commit c251680

Please sign in to comment.