Skip to content

Commit

Permalink
Merge pull request #95 from thashepherd/deprecate_version
Browse files Browse the repository at this point in the history
Deprecate version property
  • Loading branch information
Zachary Eisinger authored and GitHub committed Jul 15, 2020
2 parents 4114018 + fe319a6 commit 3af4b91
Show file tree
Hide file tree
Showing 6 changed files with 421 additions and 229 deletions.
6 changes: 1 addition & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author: 'GitHub'
branding:
icon: play
color: green
inputs:
inputs:
dotnet-version:
description: 'SDK version to use. Examples: 2.2.104, 3.1, 3.1.x'
source-url:
Expand All @@ -13,10 +13,6 @@ inputs:
description: 'Optional OWNER for using packages from GitHub Package Registry organizations/users other than the current repository''s owner. Only used if a GPR URL is also provided in source-url'
config-file:
description: 'Optional NuGet.config location, if your NuGet.config isn''t located in the root of the repo.'
# 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: 'dist/index.js'
12 changes: 6 additions & 6 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7872,13 +7872,13 @@ function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
//
// Version is optional. If supplied, install / use from the tool cache
// If not supplied then task is still used to setup proxy, auth, etc...
// dotnet-version is optional, but needs to be provided for most use cases.
// If supplied, install / use from the tool cache.
// If not supplied, look for version in ./global.json.
// If a valid version still can't be identified, nothing will be installed.
// Proxy, auth, (etc) are still set up, even if no version is identified
//
let version = core.getInput('version');
if (!version) {
version = core.getInput('dotnet-version');
}
let version = core.getInput('dotnet-version');
if (!version) {
// Try to fall back to global.json
core.debug('No version found, trying to find version from global.json');
Expand Down
Loading

0 comments on commit 3af4b91

Please sign in to comment.