chore: make win64 build to its own dir
This commit is contained in:
parent
741e302ea7
commit
1ae2f93e99
2
.gitignore
vendored
2
.gitignore
vendored
@ -30,3 +30,5 @@ dist-ssr
|
|||||||
|
|
||||||
/um-react-wry-*
|
/um-react-wry-*
|
||||||
/um-react*.exe
|
/um-react*.exe
|
||||||
|
|
||||||
|
/win64/
|
||||||
|
@ -1,28 +1,33 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# sudo apt install -y jq zip
|
||||||
|
|
||||||
pushd "$(dirname "${BASH_SOURCE[0]}")/../"
|
pushd "$(dirname "${BASH_SOURCE[0]}")/../"
|
||||||
|
|
||||||
|
WRY_VER="0.1.1"
|
||||||
|
|
||||||
|
mkdir -p win64/{deps,dist}
|
||||||
dl_file() {
|
dl_file() {
|
||||||
local FILE="$1"
|
local FILE="$1"
|
||||||
if [[ ! -f "$FILE" ]]; then
|
if [[ ! -f "win64/deps/$FILE" ]]; then
|
||||||
curl -fsL "https://um-react.app/files/${FILE}.gz" | gzip -d >"${FILE}"
|
curl -fsL "https://um-react.app/files/${FILE}.gz" | gzip -d >"win64/deps/${FILE}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
dl_file "um-react-wry-builder-0.1.0-linux-amd64"
|
dl_file "um-react-wry-builder-${WRY_VER}-linux-amd64"
|
||||||
dl_file "um-react-wry-stub-0.1.0-win64.exe"
|
dl_file "um-react-wry-stub-${WRY_VER}-win64.exe"
|
||||||
chmod a+x um-react-wry-builder-0.1.0-linux-amd64
|
chmod a+x win64/deps/um-react-wry-builder-${WRY_VER}-linux-amd64
|
||||||
|
|
||||||
APP_VERSION="$(jq -r '.version' <package.json)"
|
APP_VERSION="$(jq -r '.version' <package.json)"
|
||||||
EXE_NAME="um-react-win64-${APP_VERSION}.exe"
|
EXE_NAME="um-react-win64-${APP_VERSION}.exe"
|
||||||
ZIP_NAME="um-react-win64-${APP_VERSION}.zip"
|
ZIP_NAME="um-react-win64-${APP_VERSION}.zip"
|
||||||
./um-react-wry-builder-0.1.0-linux-amd64 \
|
"./win64/deps/um-react-wry-builder-${WRY_VER}-linux-amd64" \
|
||||||
-t um-react-wry-stub-0.1.0-win64.exe \
|
-t "win64/deps/um-react-wry-stub-${WRY_VER}-win64.exe" \
|
||||||
-r um-react.zip \
|
-r um-react.zip \
|
||||||
-o "${EXE_NAME}"
|
-o "win64/dist/${EXE_NAME}"
|
||||||
|
|
||||||
touch -d 1970-01-01T00:00:00Z "${EXE_NAME}"
|
touch -d 1970-01-01T00:00:00Z "win64/dist/${EXE_NAME}"
|
||||||
zip -9oX "${ZIP_NAME}" -- "${EXE_NAME}"
|
zip -9oX "win64/dist/${ZIP_NAME}" -- "win64/dist/${EXE_NAME}"
|
||||||
echo "[Build OK] '${ZIP_NAME}'."
|
echo "[Build OK] 'win64/dist/${ZIP_NAME}'."
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
Loading…
Reference in New Issue
Block a user