Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add flint, git-hound, lefthook #27587

Merged
merged 18 commits into from
Sep 20, 2024
14 changes: 14 additions & 0 deletions recipes/flint-checker/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
set GOPROXY=https://proxy.golang.org
go mod init flint
go mod edit -replace github.com/codegangsta/cli=github.com/urfave/cli@v1
go mod tidy -e
go mod vendor -e

go build -buildmode=pie -trimpath -o=%LIBRARY_PREFIX%\bin\flint.exe -ldflags="-s" || goto :error
go-licenses save . --save_path=license-files || goto :error

goto :EOF

:error
echo Failed with error #%errorlevel%.
exit 1
12 changes: 12 additions & 0 deletions recipes/flint-checker/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

set -o xtrace -o nounset -o pipefail -o errexit

export GOPROXY=https://proxy.golang.org
go mod init flint
go mod edit -replace github.com/codegangsta/cli=github.com/urfave/cli@v1
go mod tidy -e
go mod vendor -e

go build -buildmode=pie -trimpath -o=${PREFIX}/bin/flint -ldflags="-s -w"
go-licenses save . --save_path=license-files
35 changes: 35 additions & 0 deletions recipes/flint-checker/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{% set name = "flint-checker" %}
{% set version = "0.1.0" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/pengwynn/flint/archive/v{{ version }}.tar.gz
sha256: ec865ec5cad191c7fc9c7c6d5007754372696a708825627383913367f3ef8b7f

build:
number: 0

requirements:
build:
- {{ compiler('go-nocgo') }}
- go-licenses

test:
commands:
- flint --help

about:
home: https://github.com/pengwynn/flint
license: MIT
license_file:
- LICENSE.md
- license-files/
summary: Check your project for common sources of contributor friction
dev_url: https://github.com/pengwynn/flint

extra:
recipe-maintainers:
- danielnachun
8 changes: 8 additions & 0 deletions recipes/git-hound/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
go build -buildmode=pie -trimpath -o=%LIBRARY_PREFIX%\bin\%PKG_NAME%.exe -ldflags="-s" || goto :error
go-licenses save . --save_path=license-files || goto :error

goto :EOF

:error
echo Failed with error #%errorlevel%.
exit 1
6 changes: 6 additions & 0 deletions recipes/git-hound/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -o xtrace -o nounset -o pipefail -o errexit

go build -buildmode=pie -trimpath -o=${PREFIX}/bin/${PKG_NAME} -ldflags="-s -w"
go-licenses save . --save_path=license-files
35 changes: 35 additions & 0 deletions recipes/git-hound/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{% set name = "git-hound" %}
{% set version = "1.7.2" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/tillson/git-hound/archive/v{{ version }}.tar.gz
sha256: db285484c1377807e5f7d38bfad32e0ae547839c61e043ba74bf20f536246a33

build:
number: 0

requirements:
build:
- {{ compiler('go-nocgo') }}
- go-licenses

test:
commands:
- git-hound --help

about:
home: https://github.com/tillson/git-hound
license: MIT
license_file:
- LICENSE
- license-files/
summary: Git plugin that prevents sensitive data from being committed.
dev_url: https://github.com/tillson/git-hound

extra:
recipe-maintainers:
- danielnachun
8 changes: 8 additions & 0 deletions recipes/lefthook/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
go build -trimpath -buildmode=pie -o=%LIBRARY_PREFIX%\bin\%PKG_NAME%.exe -ldflags="-s" || goto :error
go-licenses save . --save_path=license-files || goto :error

goto :EOF

:error
echo Failed with error #%errorlevel%.
exit 1
13 changes: 13 additions & 0 deletions recipes/lefthook/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -o xtrace -o nounset -o pipefail -o errexit

go build -trimpath -buildmode=pie -o=${PREFIX}/bin/${PKG_NAME} -ldflags="-s -w"
go-licenses save . --save_path=license-files

mkdir -p ${PREFIX}/etc/bash_completion.d
mkdir -p ${PREFIX}/fish/vendor_completions.d
mkdir -p ${PREFIX}/zsh/site-functions
lefthook completion bash > ${PREFIX}/etc/bash_completion.d/lefthook
lefthook completion fish > ${PREFIX}/fish/vendor_completions.d/lefthook.fish
lefthook completion zsh > ${PREFIX}/zsh/site-functions/_lefthook
35 changes: 35 additions & 0 deletions recipes/lefthook/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{% set name = "lefthook" %}
{% set version = "1.6.16" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/evilmartians/lefthook/archive/v{{ version }}.tar.gz
sha256: 4eeb270e20e0a00145e01bdfbad4f32c7e720d762cc5c51da88d6db45ae4b6be

build:
number: 0

requirements:
build:
- {{ compiler('go-nocgo') }}
- go-licenses

test:
commands:
- lefthook --help

about:
home: https://github.com/evilmartians/lefthook
license: MIT
license_file:
- LICENSE
- license-files/
summary: Fast and powerful Git hooks manager for any type of projects
dev_url: https://github.com/evilmartians/lefthook

extra:
recipe-maintainers:
- danielnachun
Loading