Skip to content

Commit

Permalink
Integrate with goreleaser to release dunner as binary, tar, deb, rpm,…
Browse files Browse the repository at this point in the history
… snap for all os/arch
  • Loading branch information
apoorvam committed May 16, 2019
1 parent e87b91d commit e500224
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@

# Environment file
.env

# Packages
dist/*
63 changes: 63 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Goreleaser documentation at http://goreleaser.com
project_name: dunner
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- 386
- amd64
- arm
- arm64
archives:
- replacements:
386: i386
amd64: x86_64
checksum:
name_template: '{{ .ProjectName }}_checksums.txt'
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- Merge pull request
- Merge branch
- Update readme
snapshot:
name_template: "{{.ProjectName}}_{{.Tag}}"

brew:
github:
owner: leopardslab
name: homebrew-dunner
folder: Formula
homepage: https://github.com/leopardslab/Dunner
description: A Docker based task runner tool
test: |
system "#{bin}/dunner version"
nfpm:
name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
homepage: https://github.com/leopardslab/Dunner
description: A Docker based task runner tool
license: MIT
formats:
- deb
- rpm
dependencies:
- git
recommends:
- rpm
snapcraft:
name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
summary: A Docker based task runner tool
description: |
Dunner is a task runner tool like Grunt but used Docker images like CircleCI do. |
You can define tasks and steps of the tasks in your `.dunner.yaml` file and then run these steps with `Dunner do taskname`
grade: stable
confinement: devmode
publish: false
24 changes: 23 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,34 @@ env:

services:
- docker
addons:
apt:
packages:
- rpm
- snapd
env:
- PATH=/snap/bin:$PATH

before_install:
- curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep
- chmod +x $GOPATH/bin/dep

install:
- dep ensure -v
- sudo snap install snapcraft --classic

script:
- make ci

after_success:
- test -n "$TRAVIS_TAG" && snapcraft login --with snap.login

script: go test -v ./...
deploy:
- provider: script
skip_cleanup: true
script: curl -sL https://git.io/goreleaser | bash
verbose: true
on:
tags: true
condition: $TRAVIS_OS_NAME = linux
master: true
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ build: install

clean:
rm -rf *

ci: build test

0 comments on commit e500224

Please sign in to comment.