Skip to content

Commit

Permalink
Use separate goreleaser file for snap release
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorvam committed Jun 17, 2019
1 parent e3446b2 commit 321e142
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 12 deletions.
13 changes: 4 additions & 9 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ changelog:
snapshot:
name_template: "{{.ProjectName}}_{{.Tag}}"

release:
draft: true
name_template: "{{.ProjectName}} v{{.Version}}"

brew:
github:
owner: leopardslab
Expand All @@ -51,12 +55,3 @@ nfpm:
- deb
- 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: classic
publish: true
11 changes: 11 additions & 0 deletions .snap_goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
project_name: dunner

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: classic
publish: true
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ after_success:

deploy:

- provider: script
skip_cleanup: true
script: curl -sL https://git.io/goreleaser | bash -s -- --config=.snap_goreleaser.yml --rm-dist
verbose: true
on:
tags: true
condition: "$TRAVIS_OS_NAME = linux"
master: true

- provider: script
skip_cleanup: true
script: $GOPATH/bin/dunner do release_dunner -t release/.dunner.yaml
Expand Down
6 changes: 3 additions & 3 deletions release/.dunner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ release_dunner:
- image: apoorvam6/ubuntu-rpm:0.0.2
commands:
- ["rpmbuild", "--version"]
- ["curl", "-sL", "https://git.io/goreleaser | bash"]
- ["curl", "-sL", "https://git.io/goreleaser", "|", "bash", "-s", "--", "--rm-dist"]
- ["./release/publish_rpm_to_bintray.sh"]
- ["./release/publish_deb_to_bintray.sh"]
envs:
- USER=`$BITBUCKET_USER`
- API_KEY=`$BITBUCKET_API_KEY`
- USER=`$BINTRAY_USER`
- API_KEY=`$BINTRAY_API_KEY`
mounts:
- ".:/app"

0 comments on commit 321e142

Please sign in to comment.