-
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.
Signed-off-by: Evsyukov Denis <denis.evsyukov@flant.com>
- Loading branch information
Showing
8 changed files
with
164 additions
and
133 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: "Release a tag" | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
env: | ||
# https://github.com/actions/setup-go#supported-version-syntax | ||
# ex: | ||
# - 1.18beta1 -> 1.18.0-beta.1 | ||
# - 1.18rc1 -> 1.18.0-rc.1 | ||
GO_VERSION: '1.23' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: Create release | ||
uses: goreleaser/goreleaser-action@v6 | ||
with: | ||
version: latest | ||
args: release --clean --timeout=90m | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
version: 2 | ||
|
||
project_name: d8-lint | ||
|
||
builds: | ||
- binary: d8-lint | ||
main: . | ||
flags: | ||
- -trimpath | ||
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- darwin | ||
- linux | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
goarm: | ||
- "6" | ||
- "7" | ||
gomips: | ||
- hardfloat | ||
ignore: | ||
- goos: darwin | ||
goarch: "386" | ||
|
||
archives: | ||
- format: tar.gz | ||
wrap_in_directory: true | ||
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' | ||
files: | ||
- LICENSE | ||
- README.md | ||
|
||
snapshot: | ||
name_template: SNAPSHOT-{{ .Commit }} | ||
|
||
checksum: | ||
name_template: '{{ .ProjectName }}-{{ .Version }}-checksums.txt' | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '(?i)^docs?:' | ||
- '(?i)^docs\([^:]+\):' | ||
- '(?i)^docs\[[^:]+\]:' | ||
- '^tests?:' | ||
- '(?i)^dev:' | ||
- '(?i)^chore:' | ||
- '^build\(deps\): bump .* in /docs \(#\d+\)' | ||
- '^build\(deps\): bump .* in /\.github/peril \(#\d+\)' | ||
- '^build\(deps\): bump .* in /scripts/gen_github_action_config \(#\d+\)' | ||
- Merge pull request | ||
- Merge branch | ||
|
||
release: | ||
github: | ||
owner: deckhouse | ||
name: d8--lint | ||
|
||
source: | ||
enabled: true | ||
name_template: '{{ .ProjectName }}-{{ .Version }}-source' |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,57 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/deckhouse/d8-lint/cmd" | ||
"fmt" | ||
"os" | ||
|
||
"github.com/spf13/pflag" | ||
|
||
"github.com/deckhouse/d8-lint/pkg/config" | ||
"github.com/deckhouse/d8-lint/pkg/logger" | ||
) | ||
|
||
func main() { | ||
cmd.Execute() | ||
var ( | ||
printHelp bool | ||
printVersion bool | ||
cfgFile string | ||
version = "HEAD" | ||
) | ||
|
||
logger.InitLogger() | ||
|
||
flagSet := pflag.NewFlagSet("d8-lint", pflag.ContinueOnError) | ||
|
||
flagSet.BoolVarP(&printHelp, "help", "h", false, "help message") | ||
flagSet.BoolVarP(&printVersion, "version", "v", false, "version message") | ||
flagSet.StringVarP(&cfgFile, "config", "c", "", "config file (default is $HOME/.d8lint.yaml)") | ||
|
||
if err := flagSet.Parse(os.Args[1:]); err != nil { | ||
Usage(flagSet) | ||
return | ||
} | ||
|
||
if printHelp { | ||
Usage(flagSet) | ||
return | ||
} | ||
|
||
if printVersion { | ||
fmt.Println("d8-lint version: ", version) | ||
return | ||
} | ||
|
||
var dirs = flagSet.Args() | ||
if len(dirs) == 0 { | ||
dirs = []string{"."} | ||
} | ||
|
||
cfg := config.NewDefault() | ||
err := config.NewLoader(cfg).Load() | ||
logger.CheckErr(err) | ||
} | ||
|
||
func Usage(flagSet *pflag.FlagSet) { | ||
fmt.Println("Usage: d8-lint [OPTIONS]") | ||
flagSet.PrintDefaults() | ||
} |
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