Skip to content

Commit

Permalink
Added crossbuild for admftrove
Browse files Browse the repository at this point in the history
  • Loading branch information
steffenfritz committed Nov 14, 2023
1 parent 666659f commit 46c6913
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 7 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/crossbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
-
name: Build
name: Build ftrove
uses: crazy-max/ghaction-xgo@v3
with:
xgo_version: latest
Expand All @@ -39,6 +39,22 @@ jobs:
buildmode: default
trimpath: true
pkg: ./cmd/ftrove
-
name: Build admftrove
uses: crazy-max/ghaction-xgo@v3
with:
xgo_version: latest
go_version: 1.21
dest: build
prefix: admftrove
targets: windows/amd64,linux/amd64,linux/arm64,darwin/arm64
v: true
x: true
race: false
ldflags: -s -w
buildmode: default
trimpath: true
pkg: ./cmd/admftrove
-
name: Create Release
uses: actions/create-release@v1.0.0
Expand Down
2 changes: 1 addition & 1 deletion cmd/admftrove/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

BINARY=admftrove
VERSION=1.0.0-DEV-5
VERSION=1.0.0-DEV-6
BUILD=`git rev-parse --short HEAD`
PLATFORMS=darwin linux windows
ARCHITECTURES=amd64
Expand Down
7 changes: 4 additions & 3 deletions cmd/admftrove/main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package main

import (
flag "github.com/spf13/pflag"
ft "github.com/steffenfritz/FileTrove"
"log/slog"
"os"

flag "github.com/spf13/pflag"
ft "github.com/steffenfritz/FileTrove"
)

// Version holds the version of ^FileTrove and is set by the build system
Expand All @@ -20,7 +21,7 @@ func main() {
logger = slog.New(slog.NewTextHandler(os.Stdout, nil))

// Format of the source file MUST be a SHA1 hash per line
createNSRL := flag.String("creatensrl", "", "Create a BoltDB file from a text file. A source file MUST be provided.")
createNSRL := flag.String("creatensrl", "", "Create or update a BoltDB file from a text file. A source file MUST be provided.")

flag.Parse()

Expand Down
2 changes: 1 addition & 1 deletion cmd/ftrove/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

BINARY=ftrove
VERSION=1.0.0-DEV-1
VERSION=1.0.0-DEV-6
BUILD=`git rev-parse --short HEAD`
PLATFORMS=darwin linux windows
ARCHITECTURES=amd64
Expand Down
2 changes: 1 addition & 1 deletion cmd/ftrove/Taskfile.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: '3'
env:
VERSION: 1.0.0-DEV-5
VERSION: 1.0.0-DEV-6
CGO_ENABLED: "1"

tasks:
Expand Down

0 comments on commit 46c6913

Please sign in to comment.