Skip to content

Commit

Permalink
Merge pull request #46 from mroth/2019-build-system
Browse files Browse the repository at this point in the history
Minor build tooling updates for 2019
  • Loading branch information
mroth authored May 24, 2019
2 parents 5ec3d9f + c009c0e commit 6ae0bc9
Show file tree
Hide file tree
Showing 63 changed files with 163 additions and 7,730 deletions.
3 changes: 2 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ branches:
clone_folder: c:\gopath\src\github.com\mroth\scmpuff

environment:
GOPATH: c:\gopath #TODO env matrix diff go versions?
GOPATH: c:\gopath
GO111MODULE: "on"
RUBY_VERSION: Ruby23-x64

cache:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bin/
builds/
dist/
junk/
tmp/
.bundle/
Expand Down
31 changes: 31 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
before:
hooks:
- go mod download
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
ldflags:
- -s -w -X main.VERSION={{.Version}}
archives:
- replacements:
darwin: mac
amd64: x64
format_overrides:
- goos: windows
format: zip
files:
- LICENSE*
- README.md
- docs/*.txt
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
skip: true
19 changes: 0 additions & 19 deletions .goxc.json

This file was deleted.

10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
sudo: false
language: go
go:
- 1.7
- 1.8
- 1.12

env:
- GO111MODULE=on

branches:
except:
Expand All @@ -15,10 +17,11 @@ addons:

install:
- bundle install --jobs 4 --retry 3 --path vendor/bundle
- script/build
- go mod download

script:
- go test ./...
- script/build
- bundle exec cucumber -s --tags=~@wip --tags=~@recent-git-only

before_cache:
Expand All @@ -27,3 +30,4 @@ before_cache:
cache:
directories:
- vendor/bundle
- $GOPATH/pkg/mod
22 changes: 0 additions & 22 deletions Godeps/Godeps.json

This file was deleted.

5 changes: 0 additions & 5 deletions Godeps/Readme

This file was deleted.

13 changes: 3 additions & 10 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,10 @@ BINDATA = "commands/inits/bindata.go"
file BINDATA => :generate
CLEAN.include FileList.new("tmp/*")

# convenience bootstrap all for getting started
desc "bootstrap all gotool dependencies"
task :bootstrap do
sh "script/bootstrap"
end

# runs the generate script, which will bootstrap anything it needs in script
desc "generates bindata files"
task :generate do
sh "script/generate"
sh "go generate ./..."
end

# the unix build script does not force `generate` as prereq, but the task here
Expand Down Expand Up @@ -47,10 +41,9 @@ end

desc "package for distribution"
task :package do
tagged_version = `script/version`.chomp()
sh "goxc -pv='#{tagged_version}'"
sh "goreleaser release --rm-dist --skip-publish"
end
CLOBBER.include "builds"
CLOBBER.include "dist"

task :all => [:build, :test, :features]
task :default => :all
Loading

0 comments on commit 6ae0bc9

Please sign in to comment.