Skip to content

Commit

Permalink
Update to 2.0 RTM CLI (dotnet#14396)
Browse files Browse the repository at this point in the history
* Update to 2.0 RTM CLI

* PR feedback
  • Loading branch information
joperezr authored Oct 10, 2017
1 parent 2a2c3e2 commit fc5cb03
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DotnetCLIVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0-preview1-005977
2.0.0
2 changes: 1 addition & 1 deletion init-tools.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if exist "%DOTNET_CMD%" goto :afterdotnetrestore

echo Installing dotnet cli...
if NOT exist "%DOTNET_PATH%" mkdir "%DOTNET_PATH%"
set DOTNET_ZIP_NAME=dotnet-dev-win-x64.%DOTNET_VERSION%.zip
set DOTNET_ZIP_NAME=dotnet-sdk-%DOTNET_VERSION%-win-x64.zip
set DOTNET_REMOTE_PATH=https://dotnetcli.blob.core.windows.net/dotnet/Sdk/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME%
echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> "%INIT_TOOLS_LOG%"
Expand Down
19 changes: 12 additions & 7 deletions init-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ if [ -z "$__DOTNET_PKG" ]; then
echo "Error: build not supported on 32 bit Unix"
exit 1
fi

__PKG_ARCH=x64

OSName=$(uname -s)
case $OSName in
Darwin)
OS=OSX
__DOTNET_PKG=dotnet-dev-osx-x64
__PKG_RID=osx
ulimit -n 2048
# Format x.y.z as single integer with three digits for each part
VERSION=`sw_vers -productVersion| sed -e 's/\./ /g' | xargs printf "%03d%03d%03d"`
Expand All @@ -35,32 +38,34 @@ if [ -z "$__DOTNET_PKG" ]; then
;;

Linux)
__DOTNET_PKG=dotnet-dev-linux-x64
__PKG_RID=linux
OS=Linux

if [ -e /etc/os-release ]; then
source /etc/os-release
if [[ $ID == "alpine" ]]; then
# remove the last version digit
VERSION_ID=${VERSION_ID%.*}
__DOTNET_PKG=dotnet-dev-alpine.$VERSION_ID-x64
__PKG_RID=alpine.$VERSION_ID
fi

elif [ -e /etc/redhat-release ]; then
redhatRelease=$(</etc/redhat-release)
if [[ $redhatRelease == "CentOS release 6."* || $redhatRelease == "Red Hat Enterprise Linux Server release 6."* ]]; then
__DOTNET_PKG=dotnet-dev-rhel.6-x64
__PKG_RID=rhel.6
fi
fi

;;

*)
echo "Unsupported OS '$OSName' detected. Downloading linux-x64 tools."
echo "Unsupported OS '$OSName' detected. Downloading linux-$__PKG_ARCH tools."
OS=Linux
__DOTNET_PKG=dotnet-dev-linux-x64
__PKG_RID=linux
;;
esac

__DOTNET_PKG=dotnet-sdk-${__DOTNET_TOOLS_VERSION}-$__PKG_RID-$__PKG_ARCH
fi

display_error_message()
Expand All @@ -87,7 +92,7 @@ if [ ! -e $__INIT_TOOLS_DONE_MARKER ]; then
cp -r $DOTNET_TOOL_DIR/* $__DOTNET_PATH
else
echo "Installing dotnet cli..."
__DOTNET_LOCATION="https://dotnetcli.azureedge.net/dotnet/Sdk/${__DOTNET_TOOLS_VERSION}/${__DOTNET_PKG}.${__DOTNET_TOOLS_VERSION}.tar.gz"
__DOTNET_LOCATION="https://dotnetcli.azureedge.net/dotnet/Sdk/${__DOTNET_TOOLS_VERSION}/${__DOTNET_PKG}.tar.gz"
# curl has HTTPS CA trust-issues less often than wget, so lets try that first.
echo "Installing '${__DOTNET_LOCATION}' to '$__DOTNET_PATH/dotnet.tar'" >> $__init_tools_log
if command -v curl > /dev/null; then
Expand Down

0 comments on commit fc5cb03

Please sign in to comment.