-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 #22556 from cyverse/gocommands
Adding gocommands package
- Loading branch information
Showing
3 changed files
with
107 additions
and
0 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,37 @@ | ||
@echo off | ||
|
||
set PKG=github.com/cyverse/gocommands | ||
set VERSION=v%PKG_VERSION% | ||
|
||
SET BUILD_DATE=%date%-%time% | ||
set LDFLAGS="-X '%PKG%/commons.clientVersion=%VERSION%' -X '%PKG%/commons.buildDate=%BUILD_DATE%'" | ||
set GO111MODULE=on | ||
set GOPROXY=direct | ||
|
||
FOR /F "tokens=* USEBACKQ" %%F IN (`go env GOPATH`) DO ( | ||
SET GOPATH=%%F | ||
) | ||
|
||
set CGO_ENABLED=0 | ||
|
||
if not exist "%PREFIX%\bin" ( | ||
mkdir "%PREFIX%\bin" | ||
if errorlevel 1 exit 1 | ||
) | ||
|
||
echo "building gocommands" | ||
go build -v -ldflags=%LDFLAGS% -o gocmd .\cmd\gocmd.go | ||
copy gocmd.exe %PREFIX%\bin\gocmd.exe | ||
|
||
echo "{{ range . }}" > ./thirdparty_license_template | ||
echo "## {{ .Name }}" >> ./thirdparty_license_template | ||
echo "" >> ./thirdparty_license_template | ||
echo "* Name: {{ .Name }}" >> ./thirdparty_license_template | ||
echo "* Version: {{ .Version }}" >> ./thirdparty_license_template | ||
echo "* License: [{{ .LicenseName }}]({{ .LicenseURL }})" >> ./thirdparty_license_template | ||
echo "```" >> ./thirdparty_license_template | ||
echo "{{ .LicenseText }}" >> ./thirdparty_license_template | ||
echo "```" >> ./thirdparty_license_template | ||
echo "{{ end }}" >> ./thirdparty_license_template | ||
|
||
go-licenses report .\cmd --template .\thirdparty_license_template > THIRDPARTY_LICENSES |
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,29 @@ | ||
PKG=github.com/cyverse/gocommands | ||
VERSION=v${PKG_VERSION} | ||
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | ||
LDFLAGS="-X '${PKG}/commons.clientVersion=${VERSION}' -X '${PKG}/commons.buildDate=${BUILD_DATE}'" | ||
GO111MODULE=on | ||
GOPROXY=direct | ||
GOPATH=$(go env GOPATH) | ||
CGO_ENABLED=0 | ||
|
||
mkdir -p ${PREFIX}/bin | ||
echo "building gocommands" | ||
go build -v "-ldflags=${LDFLAGS}" -o gocmd ./cmd/gocmd.go | ||
cp gocmd ${PREFIX}/bin/gocmd | ||
|
||
cat <<EOF >thirdparty_license_template | ||
{{ range . }} | ||
## {{ .Name }} | ||
* Name: {{ .Name }} | ||
* Version: {{ .Version }} | ||
* License: [{{ .LicenseName }}]({{ .LicenseURL }}) | ||
``` | ||
{{ .LicenseText }} | ||
``` | ||
{{ end }} | ||
EOF | ||
|
||
go-licenses report ./cmd --template ./thirdparty_license_template > THIRDPARTY_LICENSES |
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,41 @@ | ||
{% set name = "gocommands" %} | ||
{% set version = "0.7.17" %} | ||
|
||
package: | ||
name: {{ name|lower }} | ||
version: {{ version }} | ||
|
||
source: | ||
url: https://github.com/cyverse/gocommands/archive/v{{ version }}.tar.gz | ||
sha256: 301ab74431a4b5c1559f3c3488965b9053bb7fbccd151d6c499178ea7e3edc44 | ||
|
||
build: | ||
skip: true # [win] | ||
number: 0 | ||
|
||
requirements: | ||
build: | ||
- {{ compiler('go') }} | ||
- ca-certificates | ||
- go-licenses | ||
|
||
test: | ||
commands: | ||
|
||
about: | ||
home: https://github.com/cyverse/gocommands | ||
summary: 'A protable command-line toolkit for iRODS' | ||
description: | | ||
gocommands is a portable command-line toolkit for iRODS data management service. | ||
It can run on any systems, including linux, osx, and windows. As it is written in | ||
pure Go language, it has no dependencies. | ||
license: BSD-3-Clause | ||
license_family: BSD | ||
license_file: | ||
- LICENSE | ||
- THIRDPARTY_LICENSES | ||
doc_url: https://github.com/cyverse/gocommands | ||
|
||
extra: | ||
recipe-maintainers: | ||
- iychoi |