2021-08-20 18:14:54 +08:00
|
|
|
#!/bin/bash
|
2022-09-19 21:07:16 +08:00
|
|
|
|
2021-08-20 18:14:54 +08:00
|
|
|
set -ex
|
2023-04-17 10:35:46 +08:00
|
|
|
CurrentDir="$(pwd)"
|
2022-09-19 21:07:16 +08:00
|
|
|
|
|
|
|
if [ -d "$CurrentDir/.git" ]; then
|
|
|
|
date=$(git -C "$CurrentDir" log -1 --format="%cd" --date=short | sed s/-//g)
|
|
|
|
count=$(git -C "$CurrentDir" rev-list --count HEAD)
|
|
|
|
commit=$(git -C "$CurrentDir" rev-parse --short HEAD)
|
2021-09-04 19:00:07 +08:00
|
|
|
version="unstable-$date.r${count}.$commit"
|
|
|
|
else
|
|
|
|
version="unstable"
|
|
|
|
fi
|
2022-11-06 14:33:38 +08:00
|
|
|
# https://github.com/webpack/webpack/issues/14532#issuecomment-947012063
|
2024-06-19 22:22:57 +08:00
|
|
|
cd "$CurrentDir"/gui && yarn --ignore-engines && OUTPUT_DIR="$CurrentDir"/service/server/router/web yarn --ignore-engines build
|
2023-11-25 12:43:32 +08:00
|
|
|
cd "$CurrentDir"/service && CGO_ENABLED=0 go build -tags "with_gvisor" -ldflags "-X github.com/v2rayA/v2rayA/conf.Version=$version -s -w" -o "$CurrentDir"/v2raya
|