diff options
author | tqiu8 <taqiu@microsoft.com> | 2020-06-08 21:19:20 +0300 |
---|---|---|
committer | tqiu8 <taqiu@microsoft.com> | 2020-06-08 23:31:58 +0300 |
commit | 965b2eb778a75b703c23b80dd17dc7f2125cdcbc (patch) | |
tree | 50671a09b159556174db58cb02988aa8daf370e8 /sdks | |
parent | f37c1c91dc4fec4586d6f5de3c55dea7f95cb648 (diff) |
[wasm] incorporate pr feedback & fix powershell script
Diffstat (limited to 'sdks')
-rw-r--r-- | sdks/wasm/package-update/download-packages.ps1 | 32 | ||||
-rw-r--r-- | sdks/wasm/package-update/download-packages.sh | 1 |
2 files changed, 21 insertions, 12 deletions
diff --git a/sdks/wasm/package-update/download-packages.ps1 b/sdks/wasm/package-update/download-packages.ps1 index 31b61658b7d..0cf9f4d3730 100644 --- a/sdks/wasm/package-update/download-packages.ps1 +++ b/sdks/wasm/package-update/download-packages.ps1 @@ -1,11 +1,20 @@ -$asp_remote_name="upstream" -$mono_remote_name="upstream" -$asp_branch_name="blazor-wasm" -$mono_branch_name="master" - param ($filepath, $url, $runtime, $asp_working_dir, $mono_working_dir, $asp_remote_name, $mono_remote_name) +if ($null -eq $asp_remote_name) { + $asp_remote_name="upstream" +} + +if ($null -eq $mono_remote_name) { + $mono_remote_name="upstream" +} + +if ($null -eq $asp_branch_name) { + $asp_branch_name="blazor-wasm" +} +if ($null -eq $mono_branch_name) { + $mono_branch_name="master" +} if ($null -eq $runtime) { echo "Error: runtime version required. Use -runtime" @@ -33,10 +42,11 @@ $PROXY_PACKAGE_PATH="$NUGET_HOME\\packages\\microsoft.aspnetcore.components.weba $ASP_PROXY_PATH="$asp_working_dir\\src\\Components\\WebAssembly\\DebugProxy\\src" $MONO_PROXY_PATH="$mono_working_dir\\sdks\\wasm\\Mono.WebAssembly.DebuggerProxy" $TMP_DIR=(mktemp -d) -$TMP_PKG_DIR=$TMP_DIR\\wasm-package +$TMP_PKG_DIR="$TMP_DIR\\wasm-package" +mkdir $TMP_DIR if ($null -eq $filepath) { - Invoke-WebRequest -Uri $url -OutFile "$TMP_DIR\\wasm-package.zip" -UseBasicParsing + Invoke-WebRequest -Uri $url -OutFile $TMP_DIR\wasm-package.zip -UseBasicParsing Expand-Archive "$TMP_DIR\\wasm-package.zip" -d $TMP_PKG_DIR } else { Expand-Archive $filepath -d $TMP_PKG_DIR @@ -46,7 +56,7 @@ rm -r $PACKAGE_PATH\bcl cp $TMP_PKG_DIR\wasm-bcl\wasm $PACKAGE_PATH\bcl rm -r $PACKAGE_PATH\framework -cp framework $PACKAGE_PATH\framework +cp $TMP_PKG_DIR\framework $PACKAGE_PATH\framework rm -r $PACKAGE_PATH\wasm\* cp $TMP_PKG_DIR\builds\release\dotnet.js $PACKAGE_PATH\wasm\dotnet.$runtime.js @@ -56,15 +66,13 @@ echo "Replacing DebuggerProxy" cd $mono_working_dir git checkout $mono_branch_name -git reset --hard git fetch $mono_remote_name -git pull $mono_remote_name $mono_branch_name +git reset --hard $mono_remote_name/$mono_branch_name cd $asp_working_dir git checkout $asp_branch_name -git reset --hard git fetch $asp_remote_name -git pull $asp_remote_name $asp_branch_name +git reset --hard $asp_remote_name/$asp_branch_name ./clean.ps1 diff --git a/sdks/wasm/package-update/download-packages.sh b/sdks/wasm/package-update/download-packages.sh index 90cce55f6ea..f8b81e3e388 100644 --- a/sdks/wasm/package-update/download-packages.sh +++ b/sdks/wasm/package-update/download-packages.sh @@ -1,5 +1,6 @@ #!/bin/bash set -e +set -u ASP_REMOTE_NAME="upstream" MONO_REMOTE_NAME="upstream" |