You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-09-16 09:26:52 +02:00
chore: improve pre-commit
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
2
Makefile
2
Makefile
@@ -9,7 +9,7 @@ export GOPROXY = https://proxy.golang.org,direct
|
||||
|
||||
# Setup pre-commit hooks
|
||||
dev:
|
||||
ln -sf ./scripts/pre-commit.sh .git/hooks/pre-commit
|
||||
cp -f scripts/pre-commit.sh .git/hooks/pre-commit
|
||||
.PHONY: dev
|
||||
|
||||
# Install dependencies
|
||||
|
@@ -241,7 +241,7 @@ func TestExecute(t *testing.T) {
|
||||
AnyOf: []MockCall{
|
||||
{
|
||||
ExpectedArgs: []string{"a.deb"},
|
||||
ExpectedEnv: osEnv(),
|
||||
ExpectedEnv: osEnv(),
|
||||
Stderr: "test error",
|
||||
ExitCode: 1,
|
||||
},
|
||||
|
@@ -514,7 +514,7 @@ func testSign(tb testing.TB, ctx *context.Context, signaturePaths []string, sign
|
||||
|
||||
// run the pipeline
|
||||
if expectedErrMsg != "" {
|
||||
err:=Pipe{}.Run(ctx)
|
||||
err := Pipe{}.Run(ctx)
|
||||
require.Error(tb, err)
|
||||
require.Contains(tb, err.Error(), expectedErrMsg)
|
||||
return
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
FILES=$(git diff --staged --diff-filter=AM --no-renames --name-only)
|
||||
FILES=$(git diff --cached --name-only --diff-filter=ACMR)
|
||||
|
||||
gofumpt -s -l -w $FILES
|
||||
gofumpt -s -l -w .
|
||||
golangci-lint run --new --fix
|
||||
|
||||
git add $FILES
|
||||
|
Reference in New Issue
Block a user