Skip to content

Commit

Permalink
feat: minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
Karan Sharma committed May 5, 2020
1 parent 19e30bd commit 006dce4
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 17 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ jsconfig.json

### Misc ###
config.toml
.goreleaser.yml
.DS_Store
/calert/*.tgz
56 changes: 56 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
env:
- GO111MODULE=on
- CGO_ENABLED=0
- RELEASE_BUILDS=dist/calert_darwin_amd64/calert dist/calert_linux_amd64/calert dist/calert_windows_amd64//calert.exe

builds:
- binary: calert
goos:
- windows
- darwin
- linux
goarch:
- amd64
ldflags:
- -s -w -X "main.buildVersion={{ .Tag }} ({{ .ShortCommit }} {{ .Date }})"

archives:
- format: tar.gz
files:
- config.sample.toml
- README.md
- LICENSE
dockers:
# You can have multiple Docker images.
-
# GOOS of the built binary that should be used.
goos: linux
# GOARCH of the built binary that should be used.
goarch: amd64
# GOARM of the built binary that should be used.
goarm: ''
# Name templates of the built binaries that should be used.
binaries:
- calert
# Templates of the Docker image names.
image_templates:
- "mrkaran/calert:latest"
- "mrkaran/calert:{{ .Tag }}"
# Skips the docker push. Could be useful if you also do draft releases.
# If set to auto, the release will not be pushed to the docker repository
# in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1
# Defaults to false.
skip_push: false
# Path to the Dockerfile (from the project root).
dockerfile: Dockerfile
# If your Dockerfile copies files other than the binary itself,
# you should list them here as well.
# Note that goreleaser will create the same structure inside the temporary
# folder, so if you add `foo/bar.json` here, on your Dockerfile you can
# `COPY foo/bar.json /whatever.json`.
# Also note that the paths here are relative to the folder in which
# goreleaser is being run.
# This field does not support wildcards, you can add an entire folder here
# and use wildcards when you `COPY`/`ADD` in your Dockerfile.
extra_files:
- config.sample.toml
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM alpine:latest AS deploy
RUN apk --no-cache add ca-certificates
COPY calert /
COPY config.sample.toml /etc/calert/config.toml
VOLUME ["/etc/calert"]
CMD ["./calert", "--config", "/etc/calert/config.toml"]
File renamed without changes.
16 changes: 0 additions & 16 deletions docker/Dockerfile

This file was deleted.

Binary file added knsgo
Binary file not shown.

1 comment on commit 006dce4

@MPV
Copy link
Contributor

@MPV MPV commented on 006dce4 May 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like .goreleaser.yml now does what Makefile used to do. 👍

Makefile seems broken (inconsistent with goreleaser) now though? 🤔

Please sign in to comment.