Skip to content

Commit

Permalink
Migrate from dep to Go 1.11+ modules
Browse files Browse the repository at this point in the history
  • Loading branch information
gesellix committed Feb 18, 2020
1 parent d809d02 commit 43a3249
Show file tree
Hide file tree
Showing 36 changed files with 33 additions and 6,724 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea
couchdb-cluster-config
couchdb-cluster-config.exe
40 changes: 10 additions & 30 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,17 @@
name: Go
on: [push]
jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.12
uses: actions/setup-go@v1
with:
go-version: 1.12
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1
with:
fetch-depth: 1
path: go/src/github.com/gesellix/couchdb-cluster-config

- name: Get dependencies
run: |
mkdir -p $GOPATH/bin
export PATH=$PATH:$GOPATH/bin
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
env:
GOPATH: /home/runner/work/couchdb-cluster-config/go

- name: Build
run: go build -v ./...
env:
GOPATH: /home/runner/work/couchdb-cluster-config/go
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Build
run: go build -v ./...
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
language: go
go:
- "1.10"
- "1.13"
# - tip
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM alpine:3.9 AS builder
FROM golang:1.13-alpine AS builder
LABEL builder=true

RUN adduser --no-create-home --gecos "" --disabled-password user
RUN apk add --update -t build-deps go git mercurial libc-dev gcc libgcc

ENV GO111MODULE=on
ENV CGO_ENABLED=0
ENV GOPATH /go
ENV APPPATH $GOPATH/src/github.com/gesellix/couchdb-cluster-config

RUN adduser -DH user
RUN apk add --update -t build-deps go git mercurial libc-dev gcc libgcc
COPY . $APPPATH
RUN cd $APPPATH && go get -d \
&& go build \
WORKDIR /project
COPY . /project
RUN go build \
-a \
-ldflags '-extldflags "-static"' \
-o /bin/couchdb-cluster-config
Expand Down
17 changes: 0 additions & 17 deletions Gopkg.lock

This file was deleted.

34 changes: 0 additions & 34 deletions Gopkg.toml

This file was deleted.

6 changes: 4 additions & 2 deletions couchdb-cluster-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ package main

import (
"fmt"
"github.com/gesellix/couchdb-cluster-config/pkg"
"github.com/urfave/cli"
"log"
"os"
"time"

"github.com/urfave/cli"

"github.com/gesellix/couchdb-cluster-config/pkg"
)

func main() {
Expand Down
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/gesellix/couchdb-cluster-config

go 1.13

require github.com/urfave/cli v1.22.0
5 changes: 2 additions & 3 deletions vendor/github.com/urfave/cli/go.sum → go.sum
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
github.com/urfave/cli v1.22.0 h1:8nz/RUUotroXnOpYzT/Fy3sBp+2XEbXaY641/s3nbFI=
github.com/urfave/cli v1.22.0/go.mod h1:b3D7uWrF2GilkNgYpgcg6J+JMUw7ehmNkE8sZdliGLc=
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=
2 changes: 0 additions & 2 deletions vendor/github.com/urfave/cli/.flake8

This file was deleted.

3 changes: 0 additions & 3 deletions vendor/github.com/urfave/cli/.gitignore

This file was deleted.

35 changes: 0 additions & 35 deletions vendor/github.com/urfave/cli/.travis.yml

This file was deleted.

Loading

0 comments on commit 43a3249

Please sign in to comment.