Skip to content

Commit

Permalink
Attempt to have action install version band based releases as well. (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
AraHaan authored Oct 13, 2021
1 parent fe12c9e commit 9bc5c30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ inputs:
VERSION_MAJOR:
description: Major version of the .NET SDK to install.
required: false
default: '6'
default: '7'
VERSION_MINOR:
description: Minor version of the .NET SDK to install.
required: false
default: '0'
VERSION_BAND:
description: Band version of the .NET SDK to install.
required: false
default: '1xx'

runs:
using: node12
Expand Down
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Action
{
this.versionMajor = process.env.INPUT_VERSION_MAJOR
this.versionMinor = process.env.INPUT_VERSION_MINOR
this.versionBand = process.env.INPUT_VERSION_BAND
}

_printErrorAndExit(msg)
Expand Down Expand Up @@ -71,7 +72,7 @@ class Action
console.log('Download Complete.')

// Windows.
this._executeCommand(`${__dirname}/dotnet-install.ps1 -Channel ${this.versionMajor}.${this.versionMinor} -Quality daily`, { encoding: "utf-8", stdio: [process.stdin, process.stdout, process.stderr] })
this._executeCommand(`${__dirname}/dotnet-install.ps1 -Channel ${this.versionMajor}.${this.versionMinor}.${this.versionBand} -Quality daily`, { encoding: "utf-8", stdio: [process.stdin, process.stdout, process.stderr] })
if (!process.env['DOTNET_INSTALL_DIR'])
{
// This is the default set in install-dotnet.ps1
Expand All @@ -82,7 +83,7 @@ class Action
else
{
// Linux and MacOS.
this._executeCommand(`${__dirname}/dotnet-install.sh --channel ${this.versionMajor}.${this.versionMinor} --quality daily`, { encoding: "utf-8", stdio: [process.stdin, process.stdout, process.stderr] })
this._executeCommand(`${__dirname}/dotnet-install.sh --channel ${this.versionMajor}.${this.versionMinor}.${this.versionBand} --quality daily`, { encoding: "utf-8", stdio: [process.stdin, process.stdout, process.stderr] })
if (!process.env['DOTNET_INSTALL_DIR'])
{
// This is the default set in install-dotnet.sh
Expand Down

0 comments on commit 9bc5c30

Please sign in to comment.