mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 16:35:07 +03:00
+encore.dev (#2897)
* +encore.dev * wip * update source path * encoredev/go --------- Co-authored-by: Jacob Heider <jacob@tea.xyz>
This commit is contained in:
parent
b88fba1683
commit
b44d191b2f
2 changed files with 97 additions and 0 deletions
55
projects/encore.dev/go/package.yml
Normal file
55
projects/encore.dev/go/package.yml
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
distributable: ~
|
||||||
|
|
||||||
|
versions:
|
||||||
|
github: encoredev/go
|
||||||
|
strip: /^encore-go/
|
||||||
|
|
||||||
|
provides:
|
||||||
|
- bin/go
|
||||||
|
|
||||||
|
interprets:
|
||||||
|
extensions: go
|
||||||
|
args: [go, run]
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
curl.se/ca-certs: '*'
|
||||||
|
|
||||||
|
companions:
|
||||||
|
tea.xyz/gx/cc: c99 # for `cgo`
|
||||||
|
|
||||||
|
warnings:
|
||||||
|
- vendored
|
||||||
|
|
||||||
|
runtime:
|
||||||
|
env:
|
||||||
|
ENCORE_GOROOT: ${{prefix}}
|
||||||
|
|
||||||
|
build:
|
||||||
|
dependencies:
|
||||||
|
curl.se: '*'
|
||||||
|
gnu.org/tar: '*'
|
||||||
|
script:
|
||||||
|
- curl -L https://github.com/encoredev/go/releases/download/encore-go{{version}}/$TYPE.tar.gz | tar zxvf -
|
||||||
|
- run: cp -a $SRCROOT/encore-go/* .
|
||||||
|
working-directory: ${{prefix}}
|
||||||
|
env:
|
||||||
|
linux/x86-64:
|
||||||
|
TYPE: linux_x86-64
|
||||||
|
linux/aarch64:
|
||||||
|
TYPE: linux_arm64
|
||||||
|
darwin/x86-64:
|
||||||
|
TYPE: macos_x86-64
|
||||||
|
darwin/aarch64:
|
||||||
|
TYPE: macos_arm64
|
||||||
|
|
||||||
|
test:
|
||||||
|
script: |
|
||||||
|
mv $FIXTURE $FIXTURE.go
|
||||||
|
OUTPUT=$(go run $FIXTURE.go)
|
||||||
|
test "Hello World" = "$OUTPUT"
|
||||||
|
fixture: |
|
||||||
|
package main
|
||||||
|
import "fmt"
|
||||||
|
func main() {
|
||||||
|
fmt.Println("Hello World")
|
||||||
|
}
|
42
projects/encore.dev/package.yml
Normal file
42
projects/encore.dev/package.yml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
distributable:
|
||||||
|
url: https://github.com/encoredev/encore/archive/refs/tags/v{{version}}.tar.gz
|
||||||
|
strip-components: 1
|
||||||
|
|
||||||
|
versions:
|
||||||
|
github: encoredev/encore
|
||||||
|
|
||||||
|
provides:
|
||||||
|
- bin/encore
|
||||||
|
- bin/git-remote-encore
|
||||||
|
|
||||||
|
runtime:
|
||||||
|
env:
|
||||||
|
ENCORE_RUNTIME_PATH: ${{prefix}}/runtime
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
encore.dev/go: ^1.21
|
||||||
|
|
||||||
|
build:
|
||||||
|
script:
|
||||||
|
- go mod download
|
||||||
|
- go build $ARGS -ldflags="$LDFLAGS" -o "{{prefix}}"/bin/encore ./cli/cmd/encore
|
||||||
|
- go build $ARGS -ldflags="$LDFLAGS" -o "{{prefix}}"/bin/git-remote-encore ./cli/cmd/git-remote-encore
|
||||||
|
- cp -a runtime {{prefix}}
|
||||||
|
env:
|
||||||
|
GO111MODULE: on
|
||||||
|
ARGS:
|
||||||
|
- -v
|
||||||
|
- -trimpath
|
||||||
|
LDFLAGS:
|
||||||
|
- -s
|
||||||
|
- -w
|
||||||
|
- -X 'encr.dev/internal/version.Version={{version}}'
|
||||||
|
linux:
|
||||||
|
# or segmentation fault
|
||||||
|
# fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575
|
||||||
|
LDFLAGS:
|
||||||
|
- -buildmode=pie
|
||||||
|
|
||||||
|
test:
|
||||||
|
# test errors checking update api; looks like it still runs fine.
|
||||||
|
- (encore version || true) | grep {{version}}
|
Loading…
Reference in a new issue