Skip to content

Commit e82aec8

Browse files
committed
2 parents 66acbcc + 175f0cc commit e82aec8

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

build.sh

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,29 @@ LDFLAGS="-s -w -X github.com/TruthHun/BookStack/utils.GitHash=${GITHASH} -X gith
1313

1414
##########
1515

16-
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -v -o output/mac/BookStack -ldflags "${LDFLAGS}"
17-
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o output/linux/BookStack -ldflags "${LDFLAGS}"
18-
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -v -o output/windows/BookStack.exe -ldflags "${LDFLAGS}"
19-
upx -f -9 output/mac/BookStack
20-
upx -f -9 output/linux/BookStack
21-
upx -f -9 output/windows/BookStack.exe
16+
rm -rf output/${VERSION}
17+
mkdir -p output/${VERSION}
18+
19+
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -v -o output/${VERSION}/mac/BookStack -ldflags "${LDFLAGS}"
20+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o output/${VERSION}/linux/BookStack -ldflags "${LDFLAGS}"
21+
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -v -o output/${VERSION}/windows/BookStack.exe -ldflags "${LDFLAGS}"
22+
23+
upx -f -9 output/${VERSION}/mac/BookStack
24+
upx -f -9 output/${VERSION}/linux/BookStack
25+
upx -f -9 output/${VERSION}/windows/BookStack.exe
26+
27+
cp -r conf output/${VERSION}/mac/
28+
cp -r conf output/${VERSION}/linux/
29+
cp -r conf output/${VERSION}/windows/
30+
31+
cp -r views output/${VERSION}/mac/
32+
cp -r views output/${VERSION}/linux/
33+
cp -r views output/${VERSION}/windows/
34+
35+
cp -r dictionary output/${VERSION}/mac/
36+
cp -r dictionary output/${VERSION}/linux/
37+
cp -r dictionary output/${VERSION}/windows/
38+
39+
cp -r static output/${VERSION}/mac/
40+
cp -r static output/${VERSION}/linux/
41+
cp -r static output/${VERSION}/windows/

0 commit comments

Comments
 (0)