Compare commits

...

10 Commits

Author SHA1 Message Date
bb95ce727f Merge pull request #34 from rojepp/fix_dotnet_root
Include version/architecture in DOTNET_ROOT
Fixes #40 and #29.
2019-10-18 13:55:47 -07:00
cc372bb13c Merge pull request #42 from joshmgross/joshmgross/update-install-scripts
Update external install scripts
2019-10-10 20:07:52 -04:00
86c0b21a03 Run tests on pull requests 2019-10-10 19:52:12 -04:00
d6b77de15f Update external install scripts 2019-10-10 19:41:56 -04:00
d9c317d9d5 Revert "Fixed matcher regex"
This reverts commit c61e78b585.
2019-10-10 14:51:48 -04:00
c61e78b585 Fixed matcher regex 2019-10-10 14:48:45 -04:00
6c0e2a2a6b Update action.yml 2019-09-12 10:37:27 -04:00
a668ade667 Include version/architecture in DOTNET_ROOT
Fixes #29
2019-09-11 20:22:37 +02:00
a2db70294c Update .gitignore (#26) 2019-08-27 11:13:13 -04:00
1c11308e52 Add DOTNET_ROOT (#12)
* Add DOTNET_ROOT

* Correct path

* DOTNET_ROOT should point at root, not versioned folder
2019-08-23 10:38:29 -04:00
7 changed files with 120 additions and 10 deletions

View File

@ -1,5 +1,5 @@
name: Main workflow
on: [push]
on: [push, pull_request]
jobs:
run:
name: Run

99
.gitignore vendored
View File

@ -1,7 +1,92 @@
# runtime dependencies are checked in
# dev dependencies are *not* checked in
node_modules/.bin
node_modules/typescript
node_modules/@types
node_modules/prettier
__tests__/runner/*
# Explicitly not ignoring node_modules so that they are included in package downloaded by runner
!node_modules/
__tests__/runner/*
# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
jspm_packages/
# TypeScript v1 declaration files
typings/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/

View File

@ -7,6 +7,7 @@ inputs:
# Deprecated option, do not use. Will not be supported after October 1, 2019
version:
description: 'Deprecated. Use dotnet-version instead. Will not be supported after October 1, 2019'
deprecationMessage: 'The version property will not be supported after October 1, 2019. Use dotnet-version instead'
runs:
using: 'node12'
main: 'lib/setup-dotnet.js'

View File

@ -46,6 +46,7 @@
Possible values:
- dotnet - the Microsoft.NETCore.App shared runtime
- aspnetcore - the Microsoft.AspNetCore.App shared runtime
- windowsdesktop - the Microsoft.WindowsDesktop.App shared runtime
.PARAMETER DryRun
If set it will not perform installation but instead display what command line to use to consistently install
currently requested version of dotnet cli. In example if you specify version 'latest' it will display a link
@ -83,7 +84,7 @@ param(
[string]$Version="Latest",
[string]$InstallDir="<auto>",
[string]$Architecture="<auto>",
[ValidateSet("dotnet", "aspnetcore", IgnoreCase = $false)]
[ValidateSet("dotnet", "aspnetcore", "windowsdesktop", IgnoreCase = $false)]
[string]$Runtime,
[Obsolete("This parameter may be removed in a future version of this script. The recommended alternative is '-Runtime dotnet'.")]
[switch]$SharedRuntime,
@ -268,6 +269,10 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel, [bool]$Co
elseif ($Runtime -eq "aspnetcore") {
$VersionFileUrl = "$UncachedFeed/aspnetcore/Runtime/$Channel/latest.version"
}
# Currently, the WindowsDesktop runtime is manufactured with the .Net core runtime
elseif ($Runtime -eq "windowsdesktop") {
$VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.version"
}
elseif (-not $Runtime) {
if ($Coherent) {
$VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.coherent.version"
@ -325,6 +330,9 @@ function Get-Download-Link([string]$AzureFeed, [string]$SpecificVersion, [string
elseif ($Runtime -eq "aspnetcore") {
$PayloadURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/aspnetcore-runtime-$SpecificVersion-win-$CLIArchitecture.zip"
}
elseif ($Runtime -eq "windowsdesktop") {
$PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/windowsdesktop-runtime-$SpecificVersion-win-$CLIArchitecture.zip"
}
elseif (-not $Runtime) {
$PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-sdk-$SpecificVersion-win-$CLIArchitecture.zip"
}
@ -564,6 +572,10 @@ elseif ($Runtime -eq "aspnetcore") {
$assetName = "ASP.NET Core Runtime"
$dotnetPackageRelativePath = "shared\Microsoft.AspNetCore.App"
}
elseif ($Runtime -eq "windowsdesktop") {
$assetName = ".NET Core Windows Desktop Runtime"
$dotnetPackageRelativePath = "shared\Microsoft.WindowsDesktop.App"
}
elseif (-not $Runtime) {
$assetName = ".NET Core SDK"
$dotnetPackageRelativePath = "sdk"

View File

@ -148,7 +148,7 @@ get_linux_platform_name() {
return 0
elif [ -e /etc/redhat-release ]; then
local redhatRelease=$(</etc/redhat-release)
if [[ $redhatRelease == "CentOS release 6."* || $redhatRelease == "Red Hat Enterprise Linux Server release 6."* ]]; then
if [[ $redhatRelease == "CentOS release 6."* || $redhatRelease == "Red Hat Enterprise Linux "*" release 6."* ]]; then
echo "rhel.6"
return 0
fi
@ -612,6 +612,9 @@ copy_files_or_dirs_from_list() {
local target="$out_path/$path"
if [ "$override" = true ] || (! ([ -d "$target" ] || [ -e "$target" ])); then
mkdir -p "$out_path/$(dirname "$path")"
if [ -d "$target" ]; then
rm -rf "$target"
fi
cp -R $override_switch "$root_path/$path" "$target"
fi
done
@ -868,6 +871,9 @@ do
runtime="$1"
if [[ "$runtime" != "dotnet" ]] && [[ "$runtime" != "aspnetcore" ]]; then
say_err "Unsupported value for --runtime: '$1'. Valid values are 'dotnet' and 'aspnetcore'."
if [[ "$runtime" == "windowsdesktop" ]]; then
say_err "WindowsDesktop archives are manufactured for Windows platforms only."
fi
exit 1
fi
;;

View File

@ -72,6 +72,8 @@ class DotnetCoreInstaller {
else {
console.log('Using cached tool');
}
// Need to set this so that .NET Core global tools find the right locations.
core.exportVariable('DOTNET_ROOT', toolPath);
// Prepend the tools path. instructs the agent to prepend for future tasks
core.addPath(toolPath);
});

View File

@ -58,6 +58,9 @@ export class DotnetCoreInstaller {
console.log('Using cached tool');
}
// Need to set this so that .NET Core global tools find the right locations.
core.exportVariable('DOTNET_ROOT', toolPath);
// Prepend the tools path. instructs the agent to prepend for future tasks
core.addPath(toolPath);
}
@ -171,6 +174,7 @@ export class DotnetCoreInstaller {
this.version,
this.arch
);
console.log('Successfully installed', this.version);
return cachedDir;
}