Skip to content

Commit

Permalink
[battery_cli] add cli variant of battery go package (#1909)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth authored Oct 17, 2020
1 parent 82d860c commit 10760ad
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions B/battery_cli/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using BinaryBuilder

name = "battery_cli"
version = v"0.10.0"

# Collection of sources required to build ghr
sources = [
GitSource("https://github.com/distatus/battery.git", "aa540e5be8de3bd83449b7a099341109e9ac1153"),
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/battery/cmd/battery
mkdir -p ${bindir}
go build -o ${bindir}
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = supported_platforms()

# The products that we will ensure are always built
products = [
ExecutableProduct("battery", :battery),
]

# Dependencies that must be installed before this package can be built
dependencies = [
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; compilers=[:c, :go])

0 comments on commit 10760ad

Please sign in to comment.