-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake.sh
More file actions
24 lines (19 loc) · 944 Bytes
/
Copy pathmake.sh
File metadata and controls
24 lines (19 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
ROOT_DIR=./$(realpath -s --relative-to="." "$(dirname "$0")")
. "$ROOT_DIR/scripts/utils.sh"
export APP=stdhttp
export COPYRIGHT="2024, MainDen"
export LICENSE="BSD-3-Clause License"
export URL="https://github.com/MainDen/stdhttp"
export CGO_ENABLED=0
[ -z "$VERSION" ] && export VERSION=$(git describe --tags --always --dirty)
required "VERSION"
BUILD=$ROOT_DIR/scripts/build.sh
PACKAGE=$ROOT_DIR/scripts/package.sh
# linux
GOOS="linux" GOARCH="amd64" LDFLAGS="" APP_SUFFIX="" APP_EXT="" $BUILD || error "Failed to build '$APP'."
GOOS="linux" GOARCH="amd64" $PACKAGE || error "Failed to package '$APP'."
# windows
GOOS="windows" GOARCH="amd64" LDFLAGS="" APP_SUFFIX="" APP_EXT=".exe" $BUILD || error "Failed to build '$APP'."
GOOS="windows" GOARCH="amd64" LDFLAGS="-H windowsgui" APP_SUFFIX="d" APP_EXT=".exe" $BUILD || error "Failed to build '$APP'."
GOOS="windows" GOARCH="amd64" $PACKAGE || error "Failed to package '$APP'."