Skip to content

Commit 52fe61d

Browse files
committed
updated to static compilation
1 parent f6d92a4 commit 52fe61d

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

peirates.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var UseAuthCanI bool = true
2727
// Main starts Peirates[]
2828
func Main() {
2929
// Peirates version string
30-
var version = "1.1.19"
30+
var version = "1.1.20"
3131

3232
var err error
3333

scripts/dist.sh

+13-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function compress() {
3030
rmdir peirates-${OS}-${ARCH}
3131
}
3232

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

45+
function build() {
46+
echo "Building for arch: ${ARCH}"
47+
GOOS=${OS} GOARCH=${ARCH} go build -ldflags="-s -w" $(realpath ../cmd/peirates)
48+
if [ ! -d peirates-${OS}-${ARCH} ] ; then
49+
mkdir peirates-${OS}-${ARCH}
50+
fi
51+
mv peirates peirates-${OS}-${ARCH}
52+
if [ $COMPRESS == "yes" ] ; then
53+
compress ${ARCH}
54+
fi
55+
}
56+
4557
function main() {
4658
if [ ! -e ../cmd/peirates ] ; then
4759
echo "This script must be run from the scripts/ directory."

0 commit comments

Comments
 (0)