Skip to content

Commit

Permalink
Merge pull request #70 from gruntwork-io/yori-go-modules
Browse files Browse the repository at this point in the history
Switch to using go modules for dependency management
  • Loading branch information
yorinasub17 authored Aug 1, 2020
2 parents 6d8646f + 4727b21 commit 183fc00
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 137 deletions.
50 changes: 6 additions & 44 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,73 +1,38 @@
workspace_root: &workspace_root
/go/src/github.com/gruntwork-io/fetch

vendor_path: &vendor_path
/go/src/github.com/gruntwork-io/fetch/vendor

defaults: &defaults
working_directory: *workspace_root
docker:
- image: 087285199408.dkr.ecr.us-east-1.amazonaws.com/circle-ci-test-image-base:latest
- image: 087285199408.dkr.ecr.us-east-1.amazonaws.com/circle-ci-test-image-base:go1.13

version: 2
jobs:
install_dependencies:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: *workspace_root
- restore_cache:
keys:
- dep-{{ checksum "Gopkg.lock" }}
- run: dep ensure
- save_cache:
key: dep-{{ checksum "Gopkg.lock" }}
paths:
- *vendor_path
- persist_to_workspace:
root: *workspace_root
paths: vendor

test:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: *workspace_root
- run: run-go-tests --circle-ci-2
- run: run-go-tests

build:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: *workspace_root
- run: CGO_ENABLED=0 build-go-binaries --circle-ci-2 --app-name fetch --dest-path bin --ld-flags "-X main.VERSION=$CIRCLE_TAG"
- run: CGO_ENABLED=0 build-go-binaries --app-name fetch --dest-path bin --ld-flags "-X main.VERSION=$CIRCLE_TAG"
- persist_to_workspace:
root: *workspace_root
root: .
paths: bin

deploy:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: *workspace_root
at: .
- run: cd bin && sha256sum * > SHA256SUMS
- run: upload-github-release-assets bin/*

workflows:
version: 2
build-and-test:
jobs:
- install_dependencies:
filters:
tags:
only: /^v.*/
- test:
requires:
- install_dependencies
filters:
tags:
only: /^v.*/
Expand Down Expand Up @@ -96,7 +61,4 @@ workflows:
branches:
only: master
jobs:
- install_dependencies
- test:
requires:
- install_dependencies
- test
61 changes: 0 additions & 61 deletions Gopkg.lock

This file was deleted.

32 changes: 0 additions & 32 deletions Gopkg.toml

This file was deleted.

10 changes: 10 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module github.com/gruntwork-io/fetch

go 1.14

require (
github.com/dustin/go-humanize v1.0.0
github.com/hashicorp/go-version v1.2.1
github.com/stretchr/testify v1.6.1
gopkg.in/urfave/cli.v1 v1.20.0
)
17 changes: 17 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI=
github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
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/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0=
gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 comments on commit 183fc00

Please sign in to comment.