Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mybee
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
mybee
Commits
68dcb05d
Unverified
Commit
68dcb05d
authored
May 07, 2020
by
Ivan Vandot
Committed by
GitHub
May 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Git pre push hook (#165)
parent
9f7e1e80
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
pre-push.bash
.githooks/pre-push.bash
+16
-0
Makefile
Makefile
+4
-0
No files found.
.githooks/pre-push.bash
0 → 100755
View file @
68dcb05d
#!/usr/bin/env bash
set
-euo
pipefail
# Check if we actually have commits to push
commits
=
$(
git log @
{
u
}
..
)
if
[
-z
"
$commits
"
]
;
then
exit
0
fi
if
!
command
-v
golangci-lint &> /dev/null
;
then
echo
"installing golangci-lint..."
go get
-u
github.com/golangci/golangci-lint/cmd/golangci-lint
fi
make lint vet test-race
Makefile
View file @
68dcb05d
...
...
@@ -39,6 +39,10 @@ build: export CGO_ENABLED=0
build
:
$(GO)
build
-trimpath
-ldflags
"
$(LDFLAGS)
"
./...
.PHONY
:
githooks
githooks
:
ln
-f
-s
../../.githooks/pre-push.bash .git/hooks/pre-push
.PHONY
:
clean
clean
:
$(GO)
clean
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment