Metrics
0
Watch 45 Star 185 Fork 46

阿债 / fountainGoMIT

Sign up for free
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
静态博客生成程序,Go语言编写。 spread retract

https://azhai.gitee.io

  • HTML 60.3%
  • Go 21.4%
  • CSS 15.0%
  • JavaScript 2.3%
  • Shell 0.9%
  • Other 0.1%
Clone or download
build.sh 647 Bytes
Copy Edit Web IDE Raw Blame History
阿债 authored 2019-05-04 17:43 . 更新依赖,增加windows编译脚本
#!/bin/bash
GOARCH=amd64
GOOS=$(uname -s | tr [A-Z] [a-z])
if [ "$GOOS" == "darwin" ]; then
GOBUILD="/usr/local/bin/go build --mod=vendor"
UPX=""
else
GOBUILD="/usr/bin/go build --mod=vendor"
UPX="/usr/bin/upx"
#UPX="/usr/bin/upx --ultra-brute"
fi
buildPlugin()
{
NAME="$1"
MOMENT=$(date +%FT%TZ)
FLAGS="-s -w -pluginpath=$NAME.so.$MOMENT"
rm -f "$NAME.so"
$GOBUILD -buildmode=plugin -ldflags="$FLAGS" -o "$NAME.so" converter/"$NAME.go"
}
#buildPlugin rst
rm -f fountain-linux-amd64
$GOBUILD -ldflags="-s -w" -o fountain-linux-amd64 *.go
if [ -e "$UPX" ]; then
sudo -H $UPX fountain-linux-amd64
fi

Comment ( 0 )

You need to Sign in for post a comment

Help Search