-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from eunomie/env-vars
Manage env vars and expand
- Loading branch information
Showing
9 changed files
with
416 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,59 @@ | ||
# Configuration of the code formatter to use | ||
fmt: | ||
# The tool to use. Default if gofmt, other possible value is gofumpt | ||
tool: gofumpt | ||
|
||
lint: | ||
govulncheck: | ||
enable: true | ||
golangci: | ||
enable: true | ||
image: golangci/golangci-lint:v1.50.1 | ||
|
||
# Go configuration | ||
# Go related configuration | ||
go: | ||
# Image used to build and run almost everything | ||
# Base image used to build and run tools | ||
image: golang:1.19.4-alpine3.17 | ||
# Directory where to mount the local folder | ||
# Directory to mount files | ||
appDir: /go/src | ||
# List of (sub)folders that are go modules (to download, tidy) | ||
modules: | ||
- path: . | ||
files: ["go.mod", "go.sum"] | ||
- path: ./cmd/docker-dague | ||
files: ["go.mod", "go.sum"] | ||
# List of targets to build, with parameters | ||
targets: | ||
- name: local | ||
type: local | ||
path: ./cmd/docker-dague | ||
out: ./dist | ||
ldflags: -s -w -X 'github.com/eunomie/dague/internal.Version=${DAGUE_SET_VERSION:-dev}' | ||
- name: cross | ||
type: cross | ||
path: ./cmd/docker-dague | ||
out: ./dist | ||
ldflags: -s -w -X 'github.com/eunomie/dague/internal.Version=${DAGUE_SET_VERSION:-dev}' | ||
platforms: | ||
- linux/amd64 | ||
- linux/arm64 | ||
- darwin/amd64 | ||
- darwin/arm64 | ||
- windows/amd64 | ||
- windows/arm64 | ||
# Configuration of formatters | ||
fmt: | ||
# Choice of the formatter, can be gofmt or gofumpt | ||
formatter: gofumpt | ||
# Configuration of goimports tool, that is run before the formatter | ||
goimports: | ||
# Configuration of locals to group them after 3rd party imports | ||
locals: | ||
- github.com/docker | ||
- github.com/eunomie/dague | ||
|
||
# Configuration of linters | ||
lint: | ||
# Govulncheck, can be enabled or disabled | ||
govulncheck: | ||
enable: true | ||
# Golangci-lint, can be enabled or disabled | ||
golangci: | ||
enable: true | ||
# Golangci-lint image to use | ||
image: golangci/golangci-lint:v1.50.1 | ||
|
||
# Build configuration | ||
build: | ||
# List of targets to build by their name | ||
targets: | ||
- &dague-build # This identifier will be re-used to avoid duplication | ||
name: local | ||
# Type can be local (using local os and arch as target) or cross (to enable multi-platform builds) | ||
type: local | ||
# Relative path to build | ||
path: ./cmd/docker-dague | ||
# Relative folder to put the generate files | ||
out: ./dist | ||
# List of environment variables | ||
env: | ||
# Could be a static value | ||
CGO_ENABLED: 0 | ||
# Or a shell command to execute, if starts with $ | ||
GIT_COMMIT: $ git describe --tags | cut -c 2- | ||
# Ldflags to use to build. Environment variable will be expanded. | ||
ldflags: -s -w -X 'github.com/eunomie/dague/internal.Version=${GIT_COMMIT:-dev}' | ||
- << : *dague-build # Copy all from above target and specify some values | ||
name: cross | ||
type: cross | ||
# Defines the list of platforms to build | ||
platforms: | ||
- linux/amd64 | ||
- linux/arm64 | ||
- darwin/amd64 | ||
- darwin/arm64 | ||
- windows/amd64 | ||
- windows/arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.