mirror of
https://github.com/fiatjaf/nak.git
synced 2026-02-01 06:48:51 +00:00
Compare commits
3 Commits
e838de9b72
...
c6da13649d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6da13649d | ||
|
|
acd6227dd0 | ||
|
|
00fbda9af7 |
35
.github/workflows/release-cli.yml
vendored
35
.github/workflows/release-cli.yml
vendored
@@ -24,15 +24,13 @@ jobs:
|
|||||||
- make-release
|
- make-release
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
goos: [linux, freebsd, darwin, windows]
|
goos: [linux, freebsd, windows]
|
||||||
goarch: [amd64, arm64, riscv64]
|
goarch: [amd64, arm64, riscv64]
|
||||||
exclude:
|
exclude:
|
||||||
- goarch: arm64
|
- goarch: arm64
|
||||||
goos: windows
|
goos: windows
|
||||||
- goarch: riscv64
|
- goarch: riscv64
|
||||||
goos: windows
|
goos: windows
|
||||||
- goarch: riscv64
|
|
||||||
goos: darwin
|
|
||||||
- goarch: arm64
|
- goarch: arm64
|
||||||
goos: freebsd
|
goos: freebsd
|
||||||
steps:
|
steps:
|
||||||
@@ -47,6 +45,37 @@ jobs:
|
|||||||
md5sum: false
|
md5sum: false
|
||||||
sha256sum: false
|
sha256sum: false
|
||||||
compress_assets: false
|
compress_assets: false
|
||||||
|
|
||||||
|
build-darwin:
|
||||||
|
runs-on: macos-latest
|
||||||
|
needs:
|
||||||
|
- make-release
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
goarch: [amd64, arm64]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v4
|
||||||
|
with:
|
||||||
|
go-version: 'stable'
|
||||||
|
- name: Install macFUSE
|
||||||
|
run: brew install --cask macfuse
|
||||||
|
- name: Build binary
|
||||||
|
env:
|
||||||
|
GOOS: darwin
|
||||||
|
GOARCH: ${{ matrix.goarch }}
|
||||||
|
run: |
|
||||||
|
go build -ldflags "-X main.version=${{ github.ref_name }}" -o nak-${{ github.ref_name }}-darwin-${{ matrix.goarch }}
|
||||||
|
- name: Upload Release Asset
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets. GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ needs.make-release.outputs.upload_url }}
|
||||||
|
asset_path: ./nak-${{ github.ref_name }}-darwin-${{ matrix.goarch }}
|
||||||
|
asset_name: nak-${{ github.ref_name }}-darwin-${{ matrix.goarch }}
|
||||||
|
asset_content_type: application/octet-stream
|
||||||
smoke-test-linux-amd64:
|
smoke-test-linux-amd64:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
|
|||||||
1
event.go
1
event.go
@@ -155,6 +155,7 @@ example:
|
|||||||
os.Exit(3)
|
os.Exit(3)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
kr, sec, err := gatherKeyerFromArguments(ctx, c)
|
kr, sec, err := gatherKeyerFromArguments(ctx, c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
12
helpers.go
12
helpers.go
@@ -46,8 +46,14 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func isPiped() bool {
|
func isPiped() bool {
|
||||||
stat, _ := os.Stdin.Stat()
|
stat, err := os.Stdin.Stat()
|
||||||
return stat.Mode()&os.ModeCharDevice == 0
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
mode := stat.Mode()
|
||||||
|
is := mode&os.ModeCharDevice == 0
|
||||||
|
return is
|
||||||
}
|
}
|
||||||
|
|
||||||
func getJsonsOrBlank() iter.Seq[string] {
|
func getJsonsOrBlank() iter.Seq[string] {
|
||||||
@@ -76,7 +82,7 @@ func getJsonsOrBlank() iter.Seq[string] {
|
|||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
|
|
||||||
if !hasStdin && !isPiped() {
|
if !hasStdin {
|
||||||
yield("{}")
|
yield("{}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user