Skip to content

Commit

Permalink
chore: switch from dep to modules (#619)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobheadxi committed Sep 12, 2019
1 parent 498cab5 commit 1f592bb
Show file tree
Hide file tree
Showing 12 changed files with 293 additions and 670 deletions.
3 changes: 1 addition & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ install:
- set Path=c:\go\bin;c:\gopath\bin;%PATH%
- go version
- go env
- go get -u github.com/golang/dep/cmd/dep
- dep ensure -v
- go mod download

deploy: false

Expand Down
5 changes: 1 addition & 4 deletions .scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#! /bin/bash

# Download our release binary builder
go get -u github.com/mitchellh/gox

# Specify platforms and release version
PLATFORMS="linux/amd64 linux/386 darwin/amd64 windows/amd64 windows/386"
RELEASE=$(git describe --tags)
Expand All @@ -12,6 +9,6 @@ echo "Building release $RELEASE"
make daemon-release RELEASE="$RELEASE"

# Build Inertia Go binaries for specified platforms
gox -output="inertia.$(git describe --tags).{{.OS}}.{{.Arch}}" \
go run github.com/mitchellh/gox -output="inertia.$(git describe --tags).{{.OS}}.{{.Arch}}" \
-ldflags "-w -s -X main.Version=$RELEASE" \
-osarch="$PLATFORMS" \
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:

cache:
directories:
- vendor
- $GOPATH/pkg
- images
- daemon/web/node_modules

Expand All @@ -23,8 +23,7 @@ jobs:
- stage: precache and test build
script: true
install:
- go get github.com/golang/dep/cmd/dep
- dep ensure -v # cache vendor
- go mod download # cache dependencies
- make daemon TAG=test # cache daemon image
- make web-deps # cache node_modules

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Please free free to open up a ticket if any of these instructions are unclear or

## Setup

First, [install Go](https://golang.org/doc/install#install) and grab Inertia's source code:
First, [install Go](https://golang.org/doc/install#install) (at least v1.13) and grab Inertia's source code:

```bash
$> go get -u github.com/ubclaunchpad/inertia
Expand All @@ -84,7 +84,7 @@ export GOBIN=$HOME/go/bin
```

Inertia uses:
- [dep](https://github.com/golang/dep) for managing Golang dependencies

- [npm](https://www.npmjs.com) to manage dependencies for Inertia's React web app
- [Docker](https://www.docker.com/community-edition) for various application functionalities and integration testing

Expand Down
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ ARG INERTIA_VERSION
ENV BUILD_HOME=/go/src/github.com/ubclaunchpad/inertia \
INERTIA_VERSION=${INERTIA_VERSION}
WORKDIR ${BUILD_HOME}
COPY Gopkg.toml .
COPY Gopkg.lock .
COPY go.mod .
COPY go.mod .
RUN apk add --update --no-cache git
RUN go get -u github.com/golang/dep/cmd/dep
RUN dep ensure -v -vendor-only
RUN go mod download

### Part 4 - Building the Inertia daemon
FROM daemon-build-base AS daemon-build-env
Expand Down

0 comments on commit 1f592bb

Please sign in to comment.