Skip to content

Commit

Permalink
updated to static compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
JayBeale committed May 6, 2024
1 parent f6d92a4 commit 52fe61d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion peirates.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var UseAuthCanI bool = true
// Main starts Peirates[]
func Main() {
// Peirates version string
var version = "1.1.19"
var version = "1.1.20"

var err error

Expand Down
14 changes: 13 additions & 1 deletion scripts/dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function compress() {
rmdir peirates-${OS}-${ARCH}
}

function build() {
function build-dynamic() {
echo "Building for arch: ${ARCH}"
GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-s -w" $(realpath ../cmd/peirates)
if [ ! -d peirates-${OS}-${ARCH} ] ; then
Expand All @@ -42,6 +42,18 @@ function build() {
fi
}

function build() {
echo "Building for arch: ${ARCH}"
GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-s -w" $(realpath ../cmd/peirates)
if [ ! -d peirates-${OS}-${ARCH} ] ; then
mkdir peirates-${OS}-${ARCH}
fi
mv peirates peirates-${OS}-${ARCH}
if [ $COMPRESS == "yes" ] ; then
compress ${ARCH}
fi
}

function main() {
if [ ! -e ../cmd/peirates ] ; then
echo "This script must be run from the scripts/ directory."
Expand Down

0 comments on commit 52fe61d

Please sign in to comment.