Skip to content

Commit

Permalink
Fix go modules usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Rico Berger authored and Rico Berger committed Dec 12, 2018
1 parent f4685dd commit 785578e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
32 changes: 16 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,37 @@ BUILDUSER := $(shell id -un)

build:
for target in $(WHAT); do \
go build -ldflags "-X script_exporter/pkg/version.GitCommit=${COMMIT} \
-X script_exporter/pkg/version.Version=${VERSION} \
-X script_exporter/pkg/version.BuildTime=${BUILDTIME} \
-X script_exporter/pkg/version.BuildUser=${BUILDUSER}" \
go build -ldflags "-X github.com/ricoberger/script_exporter/pkg/version.GitCommit=${COMMIT} \
-X github.com/ricoberger/script_exporter/pkg/version.Version=${VERSION} \
-X github.com/ricoberger/script_exporter/pkg/version.BuildTime=${BUILDTIME} \
-X github.com/ricoberger/script_exporter/pkg/version.BuildUser=${BUILDUSER}" \
-o ./bin/$$target ./cmd/$$target; \
done

build-darwin-amd64:
for target in $(WHAT); do \
CGO_ENABLED=0 GOARCH=amd64 GOOS=darwin go build -a -installsuffix cgo -ldflags "-X script_exporter/pkg/version.GitCommit=${COMMIT} \
-X script_exporter/pkg/version.Version=${VERSION} \
-X script_exporter/pkg/version.BuildTime=${BUILDTIME} \
-X script_exporter/pkg/version.BuildUser=${BUILDUSER}" \
CGO_ENABLED=0 GOARCH=amd64 GOOS=darwin go build -a -installsuffix cgo -ldflags "-X github.com/ricoberger/script_exporter/pkg/version.GitCommit=${COMMIT} \
-X github.com/ricoberger/script_exporter/pkg/version.Version=${VERSION} \
-X github.com/ricoberger/script_exporter/pkg/version.BuildTime=${BUILDTIME} \
-X github.com/ricoberger/script_exporter/pkg/version.BuildUser=${BUILDUSER}" \
-o ./bin/$$target-${VERSION}-darwin-amd64 ./cmd/$$target; \
done

build-linux-amd64:
for target in $(WHAT); do \
CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -a -installsuffix cgo -ldflags "-X script_exporter/pkg/version.GitCommit=${COMMIT} \
-X script_exporter/pkg/version.Version=${VERSION} \
-X script_exporter/pkg/version.BuildTime=${BUILDTIME} \
-X script_exporter/pkg/version.BuildUser=${BUILDUSER}" \
CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -a -installsuffix cgo -ldflags "-X github.com/ricoberger/script_exporter/pkg/version.GitCommit=${COMMIT} \
-X github.com/ricoberger/script_exporter/pkg/version.Version=${VERSION} \
-X github.com/ricoberger/script_exporter/pkg/version.BuildTime=${BUILDTIME} \
-X github.com/ricoberger/script_exporter/pkg/version.BuildUser=${BUILDUSER}" \
-o ./bin/$$target-${VERSION}-linux-amd64 ./cmd/$$target; \
done

build-windows-amd64:
for target in $(WHAT); do \
CGO_ENABLED=0 GOARCH=amd64 GOOS=windows go build -a -installsuffix cgo -ldflags "-X script_exporter/pkg/version.GitCommit=${COMMIT} \
-X script_exporter/pkg/version.Version=${VERSION} \
-X script_exporter/pkg/version.BuildTime=${BUILDTIME} \
-X script_exporter/pkg/version.BuildUser=${BUILDUSER}" \
CGO_ENABLED=0 GOARCH=amd64 GOOS=windows go build -a -installsuffix cgo -ldflags "-X github.com/ricoberger/script_exporter/pkg/version.GitCommit=${COMMIT} \
-X github.com/ricoberger/script_exporter/pkg/version.Version=${VERSION} \
-X github.com/ricoberger/script_exporter/pkg/version.BuildTime=${BUILDTIME} \
-X github.com/ricoberger/script_exporter/pkg/version.BuildUser=${BUILDUSER}" \
-o ./bin/$$target-${VERSION}-windows-amd64.exe ./cmd/$$target; \
done

Expand Down
4 changes: 2 additions & 2 deletions cmd/script_exporter/script_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"strings"
"time"

"script_exporter/pkg/config"
"script_exporter/pkg/version"
"github.com/ricoberger/script_exporter/pkg/config"
"github.com/ricoberger/script_exporter/pkg/version"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module script_exporter
module github.com/ricoberger/script_exporter

require (
github.com/dgrijalva/jwt-go v3.2.0+incompatible
Expand Down

0 comments on commit 785578e

Please sign in to comment.