2023-12-12 23:12:17 +03:00
|
|
|
distributable:
|
|
|
|
url: https://github.com/tidbyt/pixlet/archive/refs/tags/v{{version}}.tar.gz
|
|
|
|
strip-components: 1
|
|
|
|
|
|
|
|
display-name: pixlet
|
|
|
|
|
|
|
|
versions:
|
|
|
|
github: tidbyt/pixlet
|
|
|
|
|
|
|
|
provides:
|
|
|
|
- bin/pixlet
|
|
|
|
|
|
|
|
dependencies:
|
|
|
|
google.com/webp: ^1
|
|
|
|
|
|
|
|
build:
|
|
|
|
dependencies:
|
2024-05-14 23:29:41 +03:00
|
|
|
go.dev: ^1.22
|
2023-12-12 23:12:17 +03:00
|
|
|
npmjs.com: '*'
|
|
|
|
nodejs.org: '*'
|
|
|
|
script:
|
|
|
|
- npm i
|
|
|
|
- npm run build
|
|
|
|
- go mod download
|
|
|
|
- go build -v -trimpath -ldflags="$LDFLAGS" -o $BUILDLOC .
|
2024-05-14 23:29:41 +03:00
|
|
|
# removed in 0.33.1
|
|
|
|
# https://github.com/tidbyt/pixlet/pull/1070
|
|
|
|
- run: GOOS=js GOARCH=wasm go build -trimpath -ldflags="-s -w" -o ${BUILDLOC}.wasm tidbyt.dev/pixlet
|
|
|
|
if: <0.33.1
|
2023-12-12 23:12:17 +03:00
|
|
|
env:
|
|
|
|
BUILDLOC: '{{prefix}}/bin/pixlet'
|
|
|
|
LDFLAGS:
|
|
|
|
- -s
|
|
|
|
- -w
|
|
|
|
- -X=tidbyt.dev/pixlet/cmd.Version={{version}}
|
|
|
|
linux:
|
|
|
|
LDFLAGS:
|
|
|
|
- -buildmode=pie
|
|
|
|
|
|
|
|
test:
|
|
|
|
fixture: |
|
|
|
|
load("render.star", "render")
|
|
|
|
def main():
|
|
|
|
return render.Root(
|
|
|
|
child = render.Text("Hello, World!")
|
|
|
|
)
|
|
|
|
script:
|
|
|
|
- pixlet help
|
|
|
|
- pixlet version
|
|
|
|
- pixlet version | grep {{version}}
|
|
|
|
- cp $FIXTURE hello-world.star
|
|
|
|
- pixlet render hello-world.star
|