mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
+freeze -- Generate images of code and terminal output (#5723)
* +freeze -- Generate images of code and terminal output * fix * rename and fix trest * odd; auto detection worked for me locally * ... * sigh --------- Co-authored-by: Jacob Heider <jacob@pkgx.dev>
This commit is contained in:
parent
5a7dd711dd
commit
b1c5a2e87b
45
projects/charm.sh/freeze/package.yml
Normal file
45
projects/charm.sh/freeze/package.yml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
distributable:
|
||||||
|
url: https://github.com/charmbracelet/freeze/archive/refs/tags/v{{version}}.tar.gz
|
||||||
|
strip-components: 1
|
||||||
|
|
||||||
|
versions:
|
||||||
|
github: charmbracelet/freeze
|
||||||
|
|
||||||
|
provides:
|
||||||
|
- bin/freeze
|
||||||
|
|
||||||
|
build:
|
||||||
|
dependencies:
|
||||||
|
go.dev: ^1.19
|
||||||
|
script:
|
||||||
|
- go mod download
|
||||||
|
- go build -v -trimpath -ldflags="$LDFLAGS" -o $BUILDLOC .
|
||||||
|
env:
|
||||||
|
GOPROXY: https://proxy.golang.org,direct
|
||||||
|
GOSUMDB: sum.golang.org
|
||||||
|
GO111MODULE: on
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
BUILDLOC: '{{prefix}}/bin/freeze'
|
||||||
|
LDFLAGS:
|
||||||
|
- -s
|
||||||
|
- -w
|
||||||
|
- -X main.Version=v{{version}}
|
||||||
|
linux:
|
||||||
|
# or segmentation fault
|
||||||
|
# fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575
|
||||||
|
LDFLAGS:
|
||||||
|
- -buildmode=pie
|
||||||
|
|
||||||
|
test:
|
||||||
|
# this should work, but looks like it might need a tty
|
||||||
|
# - run: freeze $FIXTURE -l go
|
||||||
|
# fixture: |
|
||||||
|
# package main
|
||||||
|
|
||||||
|
# import "fmt"
|
||||||
|
|
||||||
|
# func main() {
|
||||||
|
# fmt.Println("hello world")
|
||||||
|
# }
|
||||||
|
# - test -s freeze.png
|
||||||
|
- freeze --help
|
Loading…
Reference in a new issue