Remove the hardcoded version of NWjs from build scripts.

This commit is contained in:
Akshay Joshi 2021-12-09 10:39:21 +05:30
parent 3a87e05f80
commit 4ee9a95360
5 changed files with 10 additions and 20 deletions

View File

@ -272,17 +272,11 @@ REM Main build sequence Ends
REM YARN END
REM WGET
REM Comment out the below for loop as the latest version (0.57.0) having
REM some problem, so for the time being hardcoded the version to 0.55.0
REM FOR /f "tokens=2 delims='" %%i IN ('yarn info nw ^| findstr "latest: "') DO SET "NW_VERSION=%%i"
REM :GET_NW
REM wget https://dl.nwjs.io/v%NW_VERSION%/nwjs-v%NW_VERSION%-win-x64.zip -O "%TMPDIR%\nwjs-v%NW_VERSION%-win-x64.zip"
REM IF %ERRORLEVEL% NEQ 0 GOTO GET_NW
FOR /f "tokens=2 delims='" %%i IN ('yarn info nw ^| findstr "latest: "') DO SET "NW_VERSION=%%i"
:GET_NW
wget https://dl.nwjs.io/v%NW_VERSION%/nwjs-v%NW_VERSION%-win-x64.zip -O "%TMPDIR%\nwjs-v%NW_VERSION%-win-x64.zip"
IF %ERRORLEVEL% NEQ 0 GOTO GET_NW
REM tar -C "%TMPDIR%" -xvf "%TMPDIR%\nwjs-v%NW_VERSION%-win-x64.zip" || EXIT /B 1
SET "NW_VERSION=0.55.0"
wget https://dl.nwjs.io/v%NW_VERSION%/nwjs-v%NW_VERSION%-win-x64.zip -O "%TMPDIR%\nwjs-v%NW_VERSION%-win-x64.zip"
tar -C "%TMPDIR%" -xvf "%TMPDIR%\nwjs-v%NW_VERSION%-win-x64.zip" || EXIT /B 1
REM WGET END

View File

@ -125,10 +125,8 @@ _build_runtime() {
# YARN END
# WGET:
# Comment out the below line as the latest version (0.57.0) having some
# problem, so for the time being hardcoded the version to 0.55.0
# NW_VERSION=$(yarn info nw | grep latest | awk -F "'" '{ print $2}')
NW_VERSION="0.55.0"
NW_VERSION=$(yarn info nw | grep latest | awk -F "'" '{ print $2}')
pushd "${BUILDROOT}" > /dev/null
while true;do
wget https://dl.nwjs.io/v${NW_VERSION}/nwjs-v${NW_VERSION}-linux-x64.tar.gz && break

View File

@ -33,10 +33,8 @@ _build_runtime() {
# YARN END
# WGET:
# Comment out the below line as the latest version (0.57.0) having some
# problem, so for the time being hardcoded the version to 0.55.0
# NW_VERSION=$(yarn info nw | grep latest | awk -F "'" '{ print $2}')
NW_VERSION="0.55.0"
NW_VERSION=$(yarn info nw | grep latest | awk -F "'" '{ print $2}')
pushd "${BUILD_ROOT}" > /dev/null
while true;do
wget https://dl.nwjs.io/v${NW_VERSION}/nwjs-v${NW_VERSION}-osx-x64.zip && break

View File

@ -24,7 +24,7 @@
},
"devDependencies": {
"eslint": "^6.3.0",
"nw": "0.59.0"
"nw": "^0.59.0"
},
"scripts": {
"linter": "yarn eslint --no-eslintrc -c .eslintrc.js --ext .js ."

View File

@ -1008,7 +1008,7 @@ number-is-nan@^1.0.0:
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=
nw@0.59.0:
nw@^0.59.0:
version "0.59.0"
resolved "https://registry.yarnpkg.com/nw/-/nw-0.59.0.tgz#c7eff1622c917834b2b31581ba5c386816d98db1"
integrity sha512-cLGZgP+u+nDfgT956Z7timXuyQN8OOi5Ele6OF3yVEkk6CNiMC6m2rblb5aB8y4QNwLf6O+tkt64XxSUPxvutQ==