Skip to content

Commit

Permalink
Feature: Switch to go modules (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricoberger authored Dec 12, 2018
1 parent da7288a commit f4685dd
Show file tree
Hide file tree
Showing 46 changed files with 32 additions and 11,621 deletions.
21 changes: 0 additions & 21 deletions Gopkg.lock

This file was deleted.

34 changes: 0 additions & 34 deletions Gopkg.toml

This file was deleted.

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 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}" \
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}" \
-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 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}" \
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}" \
-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 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}" \
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}" \
-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 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}" \
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}" \
-o ./bin/$$target-${VERSION}-windows-amd64.exe ./cmd/$$target; \
done

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ Prerequisites:
Building:

```
git clone https://github.com/ricoberger/script_exporter.git $GOPATH/src/github.com/ricoberger/script_exporter
cd $GOPATH/src/github.com/ricoberger/script_exporter
git clone https://github.com/ricoberger/script_exporter.git
cd script_exporter
dep ensure
make build
```

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"

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

const (
Expand Down
6 changes: 6 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module script_exporter

require (
github.com/dgrijalva/jwt-go v3.2.0+incompatible
gopkg.in/yaml.v2 v2.2.2
)
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
4 changes: 0 additions & 4 deletions vendor/github.com/dgrijalva/jwt-go/.gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions vendor/github.com/dgrijalva/jwt-go/.travis.yml

This file was deleted.

8 changes: 0 additions & 8 deletions vendor/github.com/dgrijalva/jwt-go/LICENSE

This file was deleted.

97 changes: 0 additions & 97 deletions vendor/github.com/dgrijalva/jwt-go/MIGRATION_GUIDE.md

This file was deleted.

Loading

0 comments on commit f4685dd

Please sign in to comment.