You've already forked setup-dotnet
mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-07-14 02:50:31 +07:00
Compare commits
33 Commits
Author | SHA1 | Date | |
---|---|---|---|
c0d4ad69d8 | |||
afe2daba1f | |||
5cc895510b | |||
158737d5b1 | |||
fcf565ec50 | |||
f078482971 | |||
0fb87b12d2 | |||
4fe7a196b5 | |||
9283a8cf7a | |||
53d632b5c0 | |||
9211491ffb | |||
edfd7b3266 | |||
9744af7b74 | |||
7016f85f93 | |||
d292011f5d | |||
608ee757cf | |||
e54e706650 | |||
c20f59e04a | |||
13b852df87 | |||
f85bcda870 | |||
499789684c | |||
76ddd67c90 | |||
550702114f | |||
e3ce4164b3 | |||
463326422f | |||
547d075822 | |||
fc9265379f | |||
32c76e2669 | |||
8ca0cf75a1 | |||
7f88dbf08f | |||
af0ed6536b | |||
9dd9d27e57 | |||
44530e8569 |
11
.github/workflows/check-dist.yml
vendored
11
.github/workflows/check-dist.yml
vendored
@ -21,12 +21,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set Node.js 12.x
|
||||
uses: actions/setup-node@v1
|
||||
- name: Set Node.js 16
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 12.x
|
||||
node-version: 16.x
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
@ -44,7 +45,7 @@ jobs:
|
||||
id: diff
|
||||
|
||||
# If index.js was different than expected, upload the expected version as an artifact
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
||||
with:
|
||||
name: dist
|
||||
|
70
.github/workflows/codeql-analysis.yml
vendored
Normal file
70
.github/workflows/codeql-analysis.yml
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ main ]
|
||||
schedule:
|
||||
- cron: '23 19 * * 0'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'javascript' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
5
.github/workflows/licensed.yml
vendored
5
.github/workflows/licensed.yml
vendored
@ -7,18 +7,19 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
name: Check licenses
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- run: npm ci
|
||||
- name: Install licensed
|
||||
run: |
|
||||
cd $RUNNER_TEMP
|
||||
curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.12.2/licensed-2.12.2-linux-x64.tar.gz
|
||||
curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.4.4/licensed-3.4.4-linux-x64.tar.gz
|
||||
sudo tar -xzf licensed.tar.gz
|
||||
sudo mv licensed /usr/local/bin/licensed
|
||||
- run: licensed status
|
||||
|
2
.github/workflows/test-dotnet.yml
vendored
2
.github/workflows/test-dotnet.yml
vendored
@ -21,7 +21,7 @@ jobs:
|
||||
dotnet-version: ['2.1', '2.2', '3.0', '3.1', '5.0']
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- name: Clear toolcache
|
||||
shell: pwsh
|
||||
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
|
||||
|
70
.github/workflows/workflow.yml
vendored
70
.github/workflows/workflow.yml
vendored
@ -20,11 +20,12 @@ jobs:
|
||||
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Set Node.js 12
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/checkout@v3
|
||||
- name: Set Node.js 16
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 12.x
|
||||
node-version: 16.x
|
||||
cache: npm
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- run: npm run format-check
|
||||
@ -33,6 +34,29 @@ jobs:
|
||||
if: runner.os != 'windows'
|
||||
run: __tests__/verify-no-unstaged-changes.sh
|
||||
|
||||
test-setup-multiple-versions:
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Clear toolcache
|
||||
shell: pwsh
|
||||
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
|
||||
- name: Setup dotnet 2.2.402 and 3.1.404
|
||||
uses: ./
|
||||
with:
|
||||
dotnet-version: |
|
||||
2.2.402
|
||||
3.1.404
|
||||
3.0.x
|
||||
- name: Verify dotnet
|
||||
shell: pwsh
|
||||
run: __tests__/verify-dotnet.ps1 2.2.402 3.1.404 '3.0'
|
||||
|
||||
test-setup-full-version:
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
strategy:
|
||||
@ -41,7 +65,7 @@ jobs:
|
||||
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- name: Clear toolcache
|
||||
shell: pwsh
|
||||
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
|
||||
@ -74,7 +98,7 @@ jobs:
|
||||
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- name: Clear toolcache
|
||||
shell: pwsh
|
||||
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
|
||||
@ -99,7 +123,7 @@ jobs:
|
||||
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- name: Clear toolcache
|
||||
shell: pwsh
|
||||
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
|
||||
@ -123,7 +147,7 @@ jobs:
|
||||
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- name: Clear toolcache
|
||||
shell: pwsh
|
||||
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
|
||||
@ -139,6 +163,32 @@ jobs:
|
||||
shell: pwsh
|
||||
run: __tests__/verify-dotnet.ps1 3.1 2.2
|
||||
|
||||
test-setup-global-json-specified-and-version:
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Clear toolcache
|
||||
shell: pwsh
|
||||
run: __tests__/clear-toolcache.ps1 ${{ runner.os }}
|
||||
- name: Write global.json
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir subdirectory
|
||||
echo '{"sdk":{"version": "2.2","rollForward": "latestFeature"}}' > ./subdirectory/global.json
|
||||
- name: Setup dotnet
|
||||
uses: ./
|
||||
with:
|
||||
dotnet-version: 3.1
|
||||
global-json-file: ./subdirectory/global.json
|
||||
- name: Verify dotnet
|
||||
shell: pwsh
|
||||
run: __tests__/verify-dotnet.ps1 2.2 3.1
|
||||
|
||||
test-proxy:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
@ -154,7 +204,7 @@ jobs:
|
||||
http_proxy: http://squid-proxy:3128
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- name: Clear tool cache
|
||||
run: rm -rf "/usr/share/dotnet"
|
||||
- name: Install curl
|
||||
@ -178,7 +228,7 @@ jobs:
|
||||
no_proxy: github.com,dotnetcli.blob.core.windows.net,download.visualstudio.microsoft.com,api.nuget.org,dotnetcli.azureedge.net
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- name: Clear tool cache
|
||||
run: rm -rf "/usr/share/dotnet"
|
||||
- name: Setup dotnet 3.1.201
|
||||
|
2
.licenses/npm/@actions/core.dep.yml
generated
2
.licenses/npm/@actions/core.dep.yml
generated
@ -1,6 +1,6 @@
|
||||
---
|
||||
name: "@actions/core"
|
||||
version: 1.2.6
|
||||
version: 1.6.0
|
||||
type: npm
|
||||
summary: Actions core lib
|
||||
homepage: https://github.com/actions/toolkit/tree/main/packages/core
|
||||
|
32
.licenses/npm/@actions/http-client-1.0.11.dep.yml
generated
Normal file
32
.licenses/npm/@actions/http-client-1.0.11.dep.yml
generated
Normal file
@ -0,0 +1,32 @@
|
||||
---
|
||||
name: "@actions/http-client"
|
||||
version: 1.0.11
|
||||
type: npm
|
||||
summary: Actions Http Client
|
||||
homepage: https://github.com/actions/http-client#readme
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
Actions Http Client for Node.js
|
||||
|
||||
Copyright (c) GitHub, Inc.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
notices: []
|
2
.licenses/npm/node-fetch.dep.yml
generated
2
.licenses/npm/node-fetch.dep.yml
generated
@ -1,6 +1,6 @@
|
||||
---
|
||||
name: node-fetch
|
||||
version: 2.6.1
|
||||
version: 2.6.7
|
||||
type: npm
|
||||
summary: A light-weight module that brings window.fetch to node.js
|
||||
homepage: https://github.com/bitinn/node-fetch
|
||||
|
30
.licenses/npm/tr46.dep.yml
generated
Normal file
30
.licenses/npm/tr46.dep.yml
generated
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
name: tr46
|
||||
version: 0.0.3
|
||||
type: npm
|
||||
summary: An implementation of the Unicode TR46 spec
|
||||
homepage: https://github.com/Sebmaster/tr46.js#readme
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: Auto-generated MIT license text
|
||||
text: |
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
notices: []
|
23
.licenses/npm/webidl-conversions.dep.yml
generated
Normal file
23
.licenses/npm/webidl-conversions.dep.yml
generated
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
name: webidl-conversions
|
||||
version: 3.0.1
|
||||
type: npm
|
||||
summary: Implements the WebIDL algorithms for converting to and from JavaScript values
|
||||
homepage:
|
||||
license: bsd-2-clause
|
||||
licenses:
|
||||
- sources: LICENSE.md
|
||||
text: |
|
||||
# The BSD 2-Clause License
|
||||
|
||||
Copyright (c) 2014, Domenic Denicola
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
notices: []
|
32
.licenses/npm/whatwg-url.dep.yml
generated
Normal file
32
.licenses/npm/whatwg-url.dep.yml
generated
Normal file
@ -0,0 +1,32 @@
|
||||
---
|
||||
name: whatwg-url
|
||||
version: 5.0.0
|
||||
type: npm
|
||||
summary: An implementation of the WHATWG URL Standard's URL API and parsing machinery
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE.txt
|
||||
text: |
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015–2016 Sebastian Mayr
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
notices: []
|
76
CODE_OF_CONDUCT.md
Normal file
76
CODE_OF_CONDUCT.md
Normal file
@ -0,0 +1,76 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to make participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||
level of experience, education, socio-economic status, nationality, personal
|
||||
appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all project spaces, and it also applies when
|
||||
an individual is representing the project or its community in public spaces.
|
||||
Examples of representing a project or community include using an official
|
||||
project e-mail address, posting via an official social media account, or acting
|
||||
as an appointed representative at an online or offline event. Representation of
|
||||
a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at opensource+actions/setup-dotnet@github.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see
|
||||
https://www.contributor-covenant.org/faq
|
65
README.md
65
README.md
@ -1,12 +1,10 @@
|
||||
# setup-dotnet
|
||||
|
||||
<p align="left">
|
||||
<a href="https://github.com/actions/setup-dotnet"><img alt="GitHub Actions status" src="https://github.com/actions/setup-dotnet/workflows/Main%20workflow/badge.svg"></a>
|
||||
</p>
|
||||
[](https://github.com/actions/setup-dotnet)
|
||||
|
||||
This action sets up a [dotnet core cli](https://github.com/dotnet/cli) environment for use in actions by:
|
||||
This action sets up a [.NET CLI](https://github.com/dotnet/sdk) environment for use in actions by:
|
||||
|
||||
- optionally downloading and caching a version of dotnet by SDK version and adding to PATH
|
||||
- optionally downloading and caching a version(s) of dotnet by SDK version(s) and adding to PATH
|
||||
- registering problem matchers for error output
|
||||
- setting up authentication to private package sources like GitHub Packages
|
||||
|
||||
@ -23,23 +21,46 @@ See [action.yml](action.yml)
|
||||
Basic:
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-dotnet@v1
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
dotnet-version: '3.1.x' # SDK Version to use; x will use the latest version of the 3.1 channel
|
||||
- run: dotnet build <my project>
|
||||
```
|
||||
Multiple versions:
|
||||
> Note: In case multiple versions are installed, the latest .NET version will be used by default unless another version is specified in the `global.json` file.
|
||||
|
||||
```yml
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
dotnet-version: |
|
||||
3.1.x
|
||||
5.0.x
|
||||
- run: dotnet build <my project>
|
||||
```
|
||||
Preview version:
|
||||
```yml
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-dotnet@v1
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
dotnet-version: '6.0.x'
|
||||
include-prerelease: true
|
||||
- run: dotnet build <my project>
|
||||
```
|
||||
global.json in a subdirectory:
|
||||
```yml
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
global-json-file: csharp/global.json
|
||||
- run: dotnet build <my project>
|
||||
working-directory: csharp
|
||||
```
|
||||
|
||||
Matrix Testing:
|
||||
```yaml
|
||||
@ -51,9 +72,9 @@ jobs:
|
||||
dotnet: [ '2.1.x', '3.1.x', '5.0.x' ]
|
||||
name: Dotnet ${{ matrix.dotnet }} sample
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v1
|
||||
uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
dotnet-version: ${{ matrix.dotnet }}
|
||||
- run: dotnet build <my project>
|
||||
@ -66,15 +87,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Dotnet Side by Side testing sample
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v1
|
||||
uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
dotnet-version: '2.1.x'
|
||||
- name: Setup dotnet
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: '3.1.x'
|
||||
dotnet-version: |
|
||||
2.1.x
|
||||
3.1.x
|
||||
- run: dotnet build <my project>
|
||||
- run: dotnet test <my project>
|
||||
```
|
||||
@ -82,9 +101,9 @@ jobs:
|
||||
Authentication for nuget feeds:
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
# Authenticates packages to push to GPR
|
||||
- uses: actions/setup-dotnet@v1
|
||||
- uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
dotnet-version: '3.1.x' # SDK Version to use.
|
||||
source-url: https://nuget.pkg.github.com/<owner>/index.json
|
||||
@ -97,7 +116,7 @@ steps:
|
||||
run: dotnet nuget push <my project>/bin/Release/*.nupkg
|
||||
|
||||
# Authenticates packages to push to Azure Artifacts
|
||||
- uses: actions/setup-dotnet@v1
|
||||
- uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
source-url: https://pkgs.dev.azure.com/<your-organization>/_packaging/<your-feed-name>/nuget/v3/index.json
|
||||
env:
|
||||
@ -107,7 +126,7 @@ steps:
|
||||
|
||||
# Authenticates packages to push to nuget.org.
|
||||
# It's only the way to push a package to nuget.org feed for macOS/Linux machines due to API key config store limitations.
|
||||
- uses: actions/setup-dotnet@v1
|
||||
- uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
dotnet-version: 3.1.x
|
||||
- name: Publish the package to nuget.org
|
||||
@ -132,7 +151,7 @@ build:
|
||||
DOTNET_NOLOGO: true
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
- uses: actions/setup-dotnet@v1
|
||||
- uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
dotnet-version: '3.1.x' # SDK Version to use.
|
||||
```
|
||||
|
@ -32,6 +32,27 @@ describe('installer tests', () => {
|
||||
}
|
||||
}, 30000);
|
||||
|
||||
it('Aquires multiple versions of dotnet', async () => {
|
||||
const versions = ['2.2.207', '3.1.120'];
|
||||
|
||||
for (const version of versions) {
|
||||
await getDotnet(version);
|
||||
}
|
||||
expect(fs.existsSync(path.join(toolDir, 'sdk', '2.2.207'))).toBe(true);
|
||||
expect(fs.existsSync(path.join(toolDir, 'sdk', '3.1.120'))).toBe(true);
|
||||
|
||||
if (IS_WINDOWS) {
|
||||
expect(fs.existsSync(path.join(toolDir, 'dotnet.exe'))).toBe(true);
|
||||
} else {
|
||||
expect(fs.existsSync(path.join(toolDir, 'dotnet'))).toBe(true);
|
||||
}
|
||||
|
||||
expect(process.env.DOTNET_ROOT).toBeDefined;
|
||||
expect(process.env.PATH).toBeDefined;
|
||||
expect(process.env.DOTNET_ROOT).toBe(toolDir);
|
||||
expect(process.env.PATH?.startsWith(toolDir)).toBe(true);
|
||||
}, 600000);
|
||||
|
||||
it('Acquires version of dotnet if no matching version is installed', async () => {
|
||||
await getDotnet('3.1.201');
|
||||
expect(fs.existsSync(path.join(toolDir, 'sdk', '3.1.201'))).toBe(true);
|
||||
@ -126,4 +147,5 @@ function normalizeFileContents(contents: string): string {
|
||||
async function getDotnet(version: string): Promise<void> {
|
||||
const dotnetInstaller = new installer.DotnetCoreInstaller(version);
|
||||
await dotnetInstaller.installDotnet();
|
||||
installer.DotnetCoreInstaller.addToPath();
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp3.1;netcoreapp2.2</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp3.1;netcoreapp3.0;netcoreapp2.2</TargetFrameworks>
|
||||
<RootNamespace>sample_csproj</RootNamespace>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
|
@ -6,6 +6,8 @@ if (!$args[0])
|
||||
$dotnet = Get-Command dotnet | Select-Object -First 1 | ForEach-Object { $_.Path }
|
||||
Write-Host "Found '$dotnet'"
|
||||
|
||||
if($args.count -eq 1)
|
||||
{
|
||||
$version = & $dotnet --version | Out-String | ForEach-Object { $_.Trim() }
|
||||
Write-Host "Version $version"
|
||||
if (-not ($version.StartsWith($args[0].ToString())))
|
||||
@ -13,22 +15,24 @@ if (-not ($version.StartsWith($args[0].ToString())))
|
||||
Write-Host "PATH='$env:PATH'"
|
||||
throw "Unexpected version"
|
||||
}
|
||||
}
|
||||
|
||||
if ($args[1])
|
||||
{
|
||||
# SDKs are listed on multiple lines with the path afterwards in square brackets
|
||||
$versions = & $dotnet --list-sdks | ForEach-Object { $_.SubString(0, $_.IndexOf('[')).Trim() }
|
||||
Write-Host "Installed versions: $versions"
|
||||
$isInstalledVersion = $false
|
||||
$InstalledVersionCount = 0
|
||||
foreach($arg in $args){
|
||||
foreach ($version in $versions)
|
||||
{
|
||||
if ($version.StartsWith($args[1].ToString()))
|
||||
if ($version.StartsWith($arg.ToString()))
|
||||
{
|
||||
$isInstalledVersion = $true
|
||||
break
|
||||
$InstalledVersionCount++
|
||||
}
|
||||
}
|
||||
if (-not $isInstalledVersion)
|
||||
}
|
||||
if ( $InstalledVersionCount -ne $args.Count)
|
||||
{
|
||||
Write-Host "PATH='$env:PATH'"
|
||||
throw "Unexpected version"
|
||||
@ -53,6 +57,13 @@ if ($args[1])
|
||||
throw "Unexpected output"
|
||||
}
|
||||
}
|
||||
if ($args[2])
|
||||
{
|
||||
if ($sample_output -notlike "*Test Run Successful.*Test Run Successful.*Test Run Successful.*")
|
||||
{
|
||||
throw "Unexpected output"
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($sample_output -notlike "*Test Run Successful.*")
|
||||
|
@ -6,7 +6,9 @@ branding:
|
||||
color: green
|
||||
inputs:
|
||||
dotnet-version:
|
||||
description: 'Optional SDK version to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x'
|
||||
description: 'Optional SDK version(s) to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x'
|
||||
global-json-file:
|
||||
description: 'Optional global.json location, if your global.json isn''t located in the root of the repo.'
|
||||
source-url:
|
||||
description: 'Optional package source for which to set up authentication. Will consult any existing NuGet.config in the root of the repo and provide a temporary NuGet.config using the NUGET_AUTH_TOKEN environment variable as a ClearTextPassword'
|
||||
owner:
|
||||
@ -17,5 +19,5 @@ inputs:
|
||||
description: 'Whether prerelease versions should be matched with non-exact versions (for example 5.0.0-preview.6 being matched by 5, 5.0, 5.x or 5.0.x). Defaults to false if not provided.'
|
||||
required: False
|
||||
runs:
|
||||
using: 'node12'
|
||||
using: 'node16'
|
||||
main: 'dist/index.js'
|
||||
|
33156
dist/index.js
vendored
33156
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@ -26,9 +26,15 @@ With any contribution please take time to consider how this can be tested to mai
|
||||
## Creating new version
|
||||
|
||||
Details on versioning can be found here: https://github.com/actions/toolkit/blob/main/docs/action-versioning.md
|
||||
Create a new release using the UI. Version format should be `v1.x.x`. Creating a new major version requires reaction from users and should be done only with breaking changes.
|
||||
Once the new release is created, the v1 tag needs to be updated as well.
|
||||
Create a new release using the UI. Version format should be `vX.Y.Z`. Creating a new major version requires reaction from users and should be done only with breaking changes.
|
||||
Once the new release is created, the vX tag needs to be updated as well.
|
||||
```
|
||||
git tag -fa v1 -m "Update v1 tag"
|
||||
git push origin v1 --force
|
||||
git tag -fa vX -m "Update vX tag"
|
||||
git push origin vX --force
|
||||
```
|
||||
|
||||
For example, if you're publishing v2:
|
||||
```
|
||||
git tag -fa v2 -m "Update v2 tag"
|
||||
git push origin v2 --force
|
||||
```
|
714
externals/install-dotnet.ps1
vendored
714
externals/install-dotnet.ps1
vendored
@ -66,11 +66,13 @@
|
||||
Displays diagnostics information.
|
||||
.PARAMETER AzureFeed
|
||||
Default: https://dotnetcli.azureedge.net/dotnet
|
||||
This parameter typically is not changed by the user.
|
||||
It allows changing the URL for the Azure feed used by this installer.
|
||||
For internal use only.
|
||||
Allows using a different storage to download SDK archives from.
|
||||
This parameter is only used if $NoCdn is false.
|
||||
.PARAMETER UncachedFeed
|
||||
This parameter typically is not changed by the user.
|
||||
It allows changing the URL for the Uncached feed used by this installer.
|
||||
For internal use only.
|
||||
Allows using a different storage to download SDK archives from.
|
||||
This parameter is only used if $NoCdn is true.
|
||||
.PARAMETER ProxyAddress
|
||||
If set, the installer will use the proxy when making web requests
|
||||
.PARAMETER ProxyUseDefaultCredentials
|
||||
@ -104,8 +106,8 @@ param(
|
||||
[switch]$SharedRuntime,
|
||||
[switch]$DryRun,
|
||||
[switch]$NoPath,
|
||||
[string]$AzureFeed="https://dotnetcli.azureedge.net/dotnet",
|
||||
[string]$UncachedFeed="https://dotnetcli.blob.core.windows.net/dotnet",
|
||||
[string]$AzureFeed,
|
||||
[string]$UncachedFeed,
|
||||
[string]$FeedCredential,
|
||||
[string]$ProxyAddress,
|
||||
[switch]$ProxyUseDefaultCredentials,
|
||||
@ -119,20 +121,6 @@ Set-StrictMode -Version Latest
|
||||
$ErrorActionPreference="Stop"
|
||||
$ProgressPreference="SilentlyContinue"
|
||||
|
||||
if ($NoCdn) {
|
||||
$AzureFeed = $UncachedFeed
|
||||
}
|
||||
|
||||
$BinFolderRelativePath=""
|
||||
|
||||
if ($SharedRuntime -and (-not $Runtime)) {
|
||||
$Runtime = "dotnet"
|
||||
}
|
||||
|
||||
# example path with regex: shared/1.0.0-beta-12345/somepath
|
||||
$VersionRegEx="/\d+\.\d+[^/]+/"
|
||||
$OverrideNonVersionedFiles = !$SkipNonVersionedFiles
|
||||
|
||||
function Say($str) {
|
||||
try {
|
||||
Write-Host "dotnet-install: $str"
|
||||
@ -207,9 +195,7 @@ function Get-Machine-Architecture() {
|
||||
# To get the correct architecture, we need to use PROCESSOR_ARCHITEW6432.
|
||||
# PS x64 doesn't define this, so we fall back to PROCESSOR_ARCHITECTURE.
|
||||
# Possible values: amd64, x64, x86, arm64, arm
|
||||
|
||||
if( $ENV:PROCESSOR_ARCHITEW6432 -ne $null )
|
||||
{
|
||||
if( $ENV:PROCESSOR_ARCHITEW6432 -ne $null ) {
|
||||
return $ENV:PROCESSOR_ARCHITEW6432
|
||||
}
|
||||
|
||||
@ -219,8 +205,11 @@ function Get-Machine-Architecture() {
|
||||
function Get-CLIArchitecture-From-Architecture([string]$Architecture) {
|
||||
Say-Invocation $MyInvocation
|
||||
|
||||
if ($Architecture -eq "<auto>") {
|
||||
$Architecture = Get-Machine-Architecture
|
||||
}
|
||||
|
||||
switch ($Architecture.ToLowerInvariant()) {
|
||||
{ $_ -eq "<auto>" } { return Get-CLIArchitecture-From-Architecture $(Get-Machine-Architecture) }
|
||||
{ ($_ -eq "amd64") -or ($_ -eq "x64") } { return "x64" }
|
||||
{ $_ -eq "x86" } { return "x86" }
|
||||
{ $_ -eq "arm" } { return "arm" }
|
||||
@ -229,7 +218,25 @@ function Get-CLIArchitecture-From-Architecture([string]$Architecture) {
|
||||
}
|
||||
}
|
||||
|
||||
function ValidateFeedCredential([string] $FeedCredential)
|
||||
{
|
||||
if ($Internal -and [string]::IsNullOrWhitespace($FeedCredential)) {
|
||||
$message = "Provide credentials via -FeedCredential parameter."
|
||||
if ($DryRun) {
|
||||
Say-Warning "$message"
|
||||
} else {
|
||||
throw "$message"
|
||||
}
|
||||
}
|
||||
|
||||
#FeedCredential should start with "?", for it to be added to the end of the link.
|
||||
#adding "?" at the beginning of the FeedCredential if needed.
|
||||
if ((![string]::IsNullOrWhitespace($FeedCredential)) -and ($FeedCredential[0] -ne '?')) {
|
||||
$FeedCredential = "?" + $FeedCredential
|
||||
}
|
||||
|
||||
return $FeedCredential
|
||||
}
|
||||
function Get-NormalizedQuality([string]$Quality) {
|
||||
Say-Invocation $MyInvocation
|
||||
|
||||
@ -282,7 +289,7 @@ function Get-NormalizedProduct([string]$Runtime) {
|
||||
# Line 2: # 4-part version
|
||||
# For the aspnetcore runtime (1 line):
|
||||
# Line 1: # 4-part version
|
||||
function Get-Version-Info-From-Version-Text([string]$VersionText) {
|
||||
function Get-Version-From-LatestVersion-File-Content([string]$VersionText) {
|
||||
Say-Invocation $MyInvocation
|
||||
|
||||
$Data = -split $VersionText
|
||||
@ -321,7 +328,11 @@ function GetHTTPResponse([Uri] $Uri, [bool]$HeaderOnly, [bool]$DisableRedirect,
|
||||
# Despite no proxy being explicitly specified, we may still be behind a default proxy
|
||||
$DefaultProxy = [System.Net.WebRequest]::DefaultWebProxy;
|
||||
if($DefaultProxy -and (-not $DefaultProxy.IsBypassed($Uri))) {
|
||||
if ($null -ne $DefaultProxy.GetProxy($Uri)) {
|
||||
$ProxyAddress = $DefaultProxy.GetProxy($Uri).OriginalString
|
||||
} else {
|
||||
$ProxyAddress = $null
|
||||
}
|
||||
$ProxyUseDefaultCredentials = $true
|
||||
}
|
||||
} catch {
|
||||
@ -424,21 +435,21 @@ function GetHTTPResponse([Uri] $Uri, [bool]$HeaderOnly, [bool]$DisableRedirect,
|
||||
}
|
||||
}
|
||||
|
||||
function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel) {
|
||||
function Get-Version-From-LatestVersion-File([string]$AzureFeed, [string]$Channel) {
|
||||
Say-Invocation $MyInvocation
|
||||
|
||||
$VersionFileUrl = $null
|
||||
if ($Runtime -eq "dotnet") {
|
||||
$VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.version"
|
||||
$VersionFileUrl = "$AzureFeed/Runtime/$Channel/latest.version"
|
||||
}
|
||||
elseif ($Runtime -eq "aspnetcore") {
|
||||
$VersionFileUrl = "$UncachedFeed/aspnetcore/Runtime/$Channel/latest.version"
|
||||
$VersionFileUrl = "$AzureFeed/aspnetcore/Runtime/$Channel/latest.version"
|
||||
}
|
||||
elseif ($Runtime -eq "windowsdesktop") {
|
||||
$VersionFileUrl = "$UncachedFeed/WindowsDesktop/$Channel/latest.version"
|
||||
$VersionFileUrl = "$AzureFeed/WindowsDesktop/$Channel/latest.version"
|
||||
}
|
||||
elseif (-not $Runtime) {
|
||||
$VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version"
|
||||
$VersionFileUrl = "$AzureFeed/Sdk/$Channel/latest.version"
|
||||
}
|
||||
else {
|
||||
throw "Invalid value for `$Runtime"
|
||||
@ -450,7 +461,7 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel) {
|
||||
$Response = GetHTTPResponse -Uri $VersionFileUrl
|
||||
}
|
||||
catch {
|
||||
Say-Error "Could not resolve version information."
|
||||
Say-Verbose "Failed to download latest.version file."
|
||||
throw
|
||||
}
|
||||
$StringContent = $Response.Content.ReadAsStringAsync().Result
|
||||
@ -462,7 +473,7 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel) {
|
||||
default { throw "``$Response.Content.Headers.ContentType`` is an unknown .version file content type." }
|
||||
}
|
||||
|
||||
$VersionInfo = Get-Version-Info-From-Version-Text $VersionText
|
||||
$VersionInfo = Get-Version-From-LatestVersion-File-Content $VersionText
|
||||
|
||||
return $VersionInfo
|
||||
}
|
||||
@ -509,7 +520,7 @@ function Get-Specific-Version-From-Version([string]$AzureFeed, [string]$Channel,
|
||||
|
||||
if (-not $JSonFile) {
|
||||
if ($Version.ToLowerInvariant() -eq "latest") {
|
||||
$LatestVersionInfo = Get-Latest-Version-Info -AzureFeed $AzureFeed -Channel $Channel
|
||||
$LatestVersionInfo = Get-Version-From-LatestVersion-File -AzureFeed $AzureFeed -Channel $Channel
|
||||
return $LatestVersionInfo.Version
|
||||
}
|
||||
else {
|
||||
@ -722,7 +733,8 @@ function Get-Absolute-Path([string]$RelativeOrAbsolutePath) {
|
||||
}
|
||||
|
||||
function Get-Path-Prefix-With-Version($path) {
|
||||
$match = [regex]::match($path, $VersionRegEx)
|
||||
# example path with regex: shared/1.0.0-beta-12345/somepath
|
||||
$match = [regex]::match($path, "/\d+\.\d+[^/]+/")
|
||||
if ($match.Success) {
|
||||
return $entry.FullName.Substring(0, $match.Index + $match.Length)
|
||||
}
|
||||
@ -736,7 +748,7 @@ function Get-List-Of-Directories-And-Versions-To-Unpack-From-Dotnet-Package([Sys
|
||||
$ret = @()
|
||||
foreach ($entry in $Zip.Entries) {
|
||||
$dir = Get-Path-Prefix-With-Version $entry.FullName
|
||||
if ($dir -ne $null) {
|
||||
if ($null -ne $dir) {
|
||||
$path = Get-Absolute-Path $(Join-Path -Path $OutPath -ChildPath $dir)
|
||||
if (-Not (Test-Path $path -PathType Container)) {
|
||||
$ret += $dir
|
||||
@ -777,7 +789,7 @@ function Extract-Dotnet-Package([string]$ZipPath, [string]$OutPath) {
|
||||
|
||||
foreach ($entry in $Zip.Entries) {
|
||||
$PathWithVersion = Get-Path-Prefix-With-Version $entry.FullName
|
||||
if (($PathWithVersion -eq $null) -Or ($DirectoriesToUnpack -contains $PathWithVersion)) {
|
||||
if (($null -eq $PathWithVersion) -Or ($DirectoriesToUnpack -contains $PathWithVersion)) {
|
||||
$DestinationPath = Get-Absolute-Path $(Join-Path -Path $OutPath -ChildPath $entry.FullName)
|
||||
$DestinationDir = Split-Path -Parent $DestinationPath
|
||||
$OverrideFiles=$OverrideNonVersionedFiles -Or (-Not (Test-Path $DestinationPath))
|
||||
@ -789,7 +801,7 @@ function Extract-Dotnet-Package([string]$ZipPath, [string]$OutPath) {
|
||||
}
|
||||
}
|
||||
finally {
|
||||
if ($Zip -ne $null) {
|
||||
if ($null -ne $Zip) {
|
||||
$Zip.Dispose()
|
||||
}
|
||||
}
|
||||
@ -818,7 +830,7 @@ function DownloadFile($Source, [string]$OutPath) {
|
||||
$File.Close()
|
||||
}
|
||||
finally {
|
||||
if ($Stream -ne $null) {
|
||||
if ($null -ne $Stream) {
|
||||
$Stream.Dispose()
|
||||
}
|
||||
}
|
||||
@ -841,8 +853,8 @@ function SafeRemoveFile($Path) {
|
||||
}
|
||||
}
|
||||
|
||||
function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot, [string]$BinFolderRelativePath) {
|
||||
$BinPath = Get-Absolute-Path $(Join-Path -Path $InstallRoot -ChildPath $BinFolderRelativePath)
|
||||
function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot) {
|
||||
$BinPath = Get-Absolute-Path $(Join-Path -Path $InstallRoot -ChildPath "")
|
||||
if (-Not $NoPath) {
|
||||
$SuffixedBinPath = "$BinPath;"
|
||||
if (-Not $env:path.Contains($SuffixedBinPath)) {
|
||||
@ -857,6 +869,36 @@ function Prepend-Sdk-InstallRoot-To-Path([string]$InstallRoot, [string]$BinFolde
|
||||
}
|
||||
}
|
||||
|
||||
function PrintDryRunOutput($Invocation, $DownloadLinks)
|
||||
{
|
||||
Say "Payload URLs:"
|
||||
|
||||
for ($linkIndex=0; $linkIndex -lt $DownloadLinks.count; $linkIndex++) {
|
||||
Say "URL #$linkIndex - $($DownloadLinks[$linkIndex].type): $($DownloadLinks[$linkIndex].downloadLink)"
|
||||
}
|
||||
$RepeatableCommand = ".\$ScriptName -Version `"$SpecificVersion`" -InstallDir `"$InstallRoot`" -Architecture `"$CLIArchitecture`""
|
||||
if ($Runtime -eq "dotnet") {
|
||||
$RepeatableCommand+=" -Runtime `"dotnet`""
|
||||
}
|
||||
elseif ($Runtime -eq "aspnetcore") {
|
||||
$RepeatableCommand+=" -Runtime `"aspnetcore`""
|
||||
}
|
||||
|
||||
foreach ($key in $Invocation.BoundParameters.Keys) {
|
||||
if (-not (@("Architecture","Channel","DryRun","InstallDir","Runtime","SharedRuntime","Version","Quality","FeedCredential") -contains $key)) {
|
||||
$RepeatableCommand+=" -$key `"$($Invocation.BoundParameters[$key])`""
|
||||
}
|
||||
}
|
||||
if ($Invocation.BoundParameters.Keys -contains "FeedCredential") {
|
||||
$RepeatableCommand+=" -FeedCredential `"<feedCredential>`""
|
||||
}
|
||||
Say "Repeatable invocation: $RepeatableCommand"
|
||||
if ($SpecificVersion -ne $EffectiveVersion)
|
||||
{
|
||||
Say "NOTE: Due to finding a version manifest with this runtime, it would actually install with version '$EffectiveVersion'"
|
||||
}
|
||||
}
|
||||
|
||||
function Get-AkaMSDownloadLink([string]$Channel, [string]$Quality, [bool]$Internal, [string]$Product, [string]$Architecture) {
|
||||
Say-Invocation $MyInvocation
|
||||
|
||||
@ -930,118 +972,69 @@ function Get-AkaMSDownloadLink([string]$Channel, [string]$Quality, [bool]$Intern
|
||||
|
||||
}
|
||||
|
||||
Say "Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:"
|
||||
Say "- The SDK needs to be installed without user interaction and without admin rights."
|
||||
Say "- The SDK installation doesn't need to persist across multiple CI runs."
|
||||
Say "To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.`r`n"
|
||||
|
||||
if ($Internal -and [string]::IsNullOrWhitespace($FeedCredential)) {
|
||||
$message = "Provide credentials via -FeedCredential parameter."
|
||||
if ($DryRun) {
|
||||
Say-Warning "$message"
|
||||
} else {
|
||||
throw "$message"
|
||||
}
|
||||
}
|
||||
|
||||
#FeedCredential should start with "?", for it to be added to the end of the link.
|
||||
#adding "?" at the beginning of the FeedCredential if needed.
|
||||
if ((![string]::IsNullOrWhitespace($FeedCredential)) -and ($FeedCredential[0] -ne '?')) {
|
||||
$FeedCredential = "?" + $FeedCredential
|
||||
}
|
||||
|
||||
$CLIArchitecture = Get-CLIArchitecture-From-Architecture $Architecture
|
||||
$NormalizedQuality = Get-NormalizedQuality $Quality
|
||||
Say-Verbose "Normalized quality: '$NormalizedQuality'"
|
||||
$NormalizedChannel = Get-NormalizedChannel $Channel
|
||||
Say-Verbose "Normalized channel: '$NormalizedChannel'"
|
||||
$NormalizedProduct = Get-NormalizedProduct $Runtime
|
||||
Say-Verbose "Normalized product: '$NormalizedProduct'"
|
||||
$DownloadLink = $null
|
||||
|
||||
#try to get download location from aka.ms link
|
||||
#not applicable when exact version is specified via command or json file
|
||||
if ([string]::IsNullOrEmpty($JSonFile) -and ($Version -eq "latest")) {
|
||||
$AkaMsDownloadLink = Get-AkaMSDownloadLink -Channel $NormalizedChannel -Quality $NormalizedQuality -Internal $Internal -Product $NormalizedProduct -Architecture $CLIArchitecture
|
||||
function Get-AkaMsLink-And-Version([string] $NormalizedChannel, [string] $NormalizedQuality, [bool] $Internal, [string] $ProductName, [string] $Architecture) {
|
||||
$AkaMsDownloadLink = Get-AkaMSDownloadLink -Channel $NormalizedChannel -Quality $NormalizedQuality -Internal $Internal -Product $ProductName -Architecture $Architecture
|
||||
|
||||
if ([string]::IsNullOrEmpty($AkaMsDownloadLink)){
|
||||
if (-not [string]::IsNullOrEmpty($NormalizedQuality)) {
|
||||
# if quality is specified - exit with error - there is no fallback approach
|
||||
Say-Error "Failed to locate the latest version in the channel '$NormalizedChannel' with '$NormalizedQuality' quality for '$NormalizedProduct', os: 'win', architecture: '$CLIArchitecture'."
|
||||
Say-Error "Failed to locate the latest version in the channel '$NormalizedChannel' with '$NormalizedQuality' quality for '$ProductName', os: 'win', architecture: '$Architecture'."
|
||||
Say-Error "Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support."
|
||||
throw "aka.ms link resolution failure"
|
||||
}
|
||||
Say-Verbose "Falling back to latest.version file approach."
|
||||
return ($null, $null, $null)
|
||||
}
|
||||
else {
|
||||
Say-Verbose "Retrieved primary named payload URL from aka.ms link: '$AkaMsDownloadLink'."
|
||||
$DownloadLink = $AkaMsDownloadLink
|
||||
Say-Verbose "Downloading using legacy url will not be attempted."
|
||||
$LegacyDownloadLink = $null
|
||||
|
||||
#get version from the path
|
||||
$pathParts = $DownloadLink.Split('/')
|
||||
$pathParts = $AkaMsDownloadLink.Split('/')
|
||||
if ($pathParts.Length -ge 2) {
|
||||
$SpecificVersion = $pathParts[$pathParts.Length - 2]
|
||||
Say-Verbose "Version: '$SpecificVersion'."
|
||||
}
|
||||
else {
|
||||
Say-Error "Failed to extract the version from download link '$DownloadLink'."
|
||||
Say-Error "Failed to extract the version from download link '$AkaMsDownloadLink'."
|
||||
return ($null, $null, $null)
|
||||
}
|
||||
|
||||
#retrieve effective (product) version
|
||||
$EffectiveVersion = Get-Product-Version -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -PackageDownloadLink $DownloadLink
|
||||
$EffectiveVersion = Get-Product-Version -SpecificVersion $SpecificVersion -PackageDownloadLink $AkaMsDownloadLink
|
||||
Say-Verbose "Product version: '$EffectiveVersion'."
|
||||
|
||||
return ($AkaMsDownloadLink, $SpecificVersion, $EffectiveVersion);
|
||||
}
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrEmpty($DownloadLink)) {
|
||||
$SpecificVersion = Get-Specific-Version-From-Version -AzureFeed $AzureFeed -Channel $Channel -Version $Version -JSonFile $JSonFile
|
||||
$DownloadLink, $EffectiveVersion = Get-Download-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
|
||||
$LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $AzureFeed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
|
||||
}
|
||||
|
||||
|
||||
$InstallRoot = Resolve-Installation-Path $InstallDir
|
||||
Say-Verbose "InstallRoot: $InstallRoot"
|
||||
$ScriptName = $MyInvocation.MyCommand.Name
|
||||
|
||||
if ($DryRun) {
|
||||
Say "Payload URLs:"
|
||||
Say "Primary named payload URL: ${DownloadLink}"
|
||||
if ($LegacyDownloadLink) {
|
||||
Say "Legacy named payload URL: ${LegacyDownloadLink}"
|
||||
}
|
||||
$RepeatableCommand = ".\$ScriptName -Version `"$SpecificVersion`" -InstallDir `"$InstallRoot`" -Architecture `"$CLIArchitecture`""
|
||||
if ($Runtime -eq "dotnet") {
|
||||
$RepeatableCommand+=" -Runtime `"dotnet`""
|
||||
}
|
||||
elseif ($Runtime -eq "aspnetcore") {
|
||||
$RepeatableCommand+=" -Runtime `"aspnetcore`""
|
||||
}
|
||||
|
||||
if (-not [string]::IsNullOrEmpty($NormalizedQuality))
|
||||
function Get-Feeds-To-Use()
|
||||
{
|
||||
$RepeatableCommand+=" -Quality `"$NormalizedQuality`""
|
||||
$feeds = @(
|
||||
"https://dotnetcli.azureedge.net/dotnet",
|
||||
"https://dotnetbuilds.azureedge.net/public"
|
||||
)
|
||||
|
||||
if (-not [string]::IsNullOrEmpty($AzureFeed)) {
|
||||
$feeds = @($AzureFeed)
|
||||
}
|
||||
|
||||
foreach ($key in $MyInvocation.BoundParameters.Keys) {
|
||||
if (-not (@("Architecture","Channel","DryRun","InstallDir","Runtime","SharedRuntime","Version","Quality","FeedCredential") -contains $key)) {
|
||||
$RepeatableCommand+=" -$key `"$($MyInvocation.BoundParameters[$key])`""
|
||||
if ($NoCdn) {
|
||||
$feeds = @(
|
||||
"https://dotnetcli.blob.core.windows.net/dotnet",
|
||||
"https://dotnetbuilds.blob.core.windows.net/public"
|
||||
)
|
||||
|
||||
if (-not [string]::IsNullOrEmpty($UncachedFeed)) {
|
||||
$feeds = @($UncachedFeed)
|
||||
}
|
||||
}
|
||||
if ($MyInvocation.BoundParameters.Keys -contains "FeedCredential") {
|
||||
$RepeatableCommand+=" -FeedCredential `"<feedCredential>`""
|
||||
}
|
||||
Say "Repeatable invocation: $RepeatableCommand"
|
||||
if ($SpecificVersion -ne $EffectiveVersion)
|
||||
{
|
||||
Say "NOTE: Due to finding a version manifest with this runtime, it would actually install with version '$EffectiveVersion'"
|
||||
}
|
||||
|
||||
return
|
||||
return $feeds
|
||||
}
|
||||
|
||||
function Resolve-AssetName-And-RelativePath([string] $Runtime) {
|
||||
|
||||
if ($Runtime -eq "dotnet") {
|
||||
$assetName = ".NET Core Runtime"
|
||||
$dotnetPackageRelativePath = "shared\Microsoft.NETCore.App"
|
||||
@ -1062,20 +1055,10 @@ else {
|
||||
throw "Invalid value for `$Runtime"
|
||||
}
|
||||
|
||||
if ($SpecificVersion -ne $EffectiveVersion)
|
||||
{
|
||||
Say "Performing installation checks for effective version: $EffectiveVersion"
|
||||
$SpecificVersion = $EffectiveVersion
|
||||
}
|
||||
|
||||
# Check if the SDK version is already installed.
|
||||
$isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $SpecificVersion
|
||||
if ($isAssetInstalled) {
|
||||
Say "$assetName version $SpecificVersion is already installed."
|
||||
Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot -BinFolderRelativePath $BinFolderRelativePath
|
||||
return
|
||||
return ($assetName, $dotnetPackageRelativePath)
|
||||
}
|
||||
|
||||
function Prepare-Install-Directory {
|
||||
New-Item -ItemType Directory -Force -Path $InstallRoot | Out-Null
|
||||
|
||||
$installDrive = $((Get-Item $InstallRoot -Force).PSDrive.Name);
|
||||
@ -1087,164 +1070,223 @@ catch{
|
||||
Say-Warning "Failed to check the disk space. Installation will continue, but it may fail if you do not have enough disk space."
|
||||
}
|
||||
|
||||
if ( ($diskInfo -ne $null) -and ($diskInfo.Free / 1MB -le 100)) {
|
||||
if ( ($null -ne $diskInfo) -and ($diskInfo.Free / 1MB -le 100)) {
|
||||
throw "There is not enough disk space on drive ${installDrive}:"
|
||||
}
|
||||
}
|
||||
|
||||
Say "Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:"
|
||||
Say "- The SDK needs to be installed without user interaction and without admin rights."
|
||||
Say "- The SDK installation doesn't need to persist across multiple CI runs."
|
||||
Say "To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.`r`n"
|
||||
|
||||
if ($SharedRuntime -and (-not $Runtime)) {
|
||||
$Runtime = "dotnet"
|
||||
}
|
||||
|
||||
$OverrideNonVersionedFiles = !$SkipNonVersionedFiles
|
||||
|
||||
$CLIArchitecture = Get-CLIArchitecture-From-Architecture $Architecture
|
||||
$NormalizedQuality = Get-NormalizedQuality $Quality
|
||||
Say-Verbose "Normalized quality: '$NormalizedQuality'"
|
||||
$NormalizedChannel = Get-NormalizedChannel $Channel
|
||||
Say-Verbose "Normalized channel: '$NormalizedChannel'"
|
||||
$NormalizedProduct = Get-NormalizedProduct $Runtime
|
||||
Say-Verbose "Normalized product: '$NormalizedProduct'"
|
||||
$FeedCredential = ValidateFeedCredential $FeedCredential
|
||||
|
||||
$InstallRoot = Resolve-Installation-Path $InstallDir
|
||||
Say-Verbose "InstallRoot: $InstallRoot"
|
||||
$ScriptName = $MyInvocation.MyCommand.Name
|
||||
($assetName, $dotnetPackageRelativePath) = Resolve-AssetName-And-RelativePath -Runtime $Runtime
|
||||
|
||||
$feeds = Get-Feeds-To-Use
|
||||
$DownloadLinks = @()
|
||||
|
||||
# aka.ms links can only be used if the user did not request a specific version via the command line or a global.json file.
|
||||
if ([string]::IsNullOrEmpty($JSonFile) -and ($Version -eq "latest")) {
|
||||
($DownloadLink, $SpecificVersion, $EffectiveVersion) = Get-AkaMsLink-And-Version $NormalizedChannel $NormalizedQuality $Internal $NormalizedProduct $CLIArchitecture
|
||||
|
||||
if ($null -ne $DownloadLink) {
|
||||
$DownloadLinks += New-Object PSObject -Property @{downloadLink="$DownloadLink";specificVersion="$SpecificVersion";effectiveVersion="$EffectiveVersion";type='aka.ms'}
|
||||
Say-Verbose "Generated aka.ms link $DownloadLink with version $EffectiveVersion"
|
||||
|
||||
if (-Not $DryRun) {
|
||||
Say-Verbose "Checking if the version $EffectiveVersion is already installed"
|
||||
if (Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $EffectiveVersion)
|
||||
{
|
||||
Say "$assetName with version '$EffectiveVersion' is already installed."
|
||||
Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Primary and legacy links cannot be used if a quality was specified.
|
||||
# If we already have an aka.ms link, no need to search the blob feeds.
|
||||
if ([string]::IsNullOrEmpty($NormalizedQuality) -and 0 -eq $DownloadLinks.count)
|
||||
{
|
||||
foreach ($feed in $feeds) {
|
||||
try {
|
||||
$SpecificVersion = Get-Specific-Version-From-Version -AzureFeed $feed -Channel $Channel -Version $Version -JSonFile $JSonFile
|
||||
$DownloadLink, $EffectiveVersion = Get-Download-Link -AzureFeed $feed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
|
||||
$LegacyDownloadLink = Get-LegacyDownload-Link -AzureFeed $feed -SpecificVersion $SpecificVersion -CLIArchitecture $CLIArchitecture
|
||||
|
||||
$DownloadLinks += New-Object PSObject -Property @{downloadLink="$DownloadLink";specificVersion="$SpecificVersion";effectiveVersion="$EffectiveVersion";type='primary'}
|
||||
Say-Verbose "Generated primary link $DownloadLink with version $EffectiveVersion"
|
||||
|
||||
if (-not [string]::IsNullOrEmpty($LegacyDownloadLink)) {
|
||||
$DownloadLinks += New-Object PSObject -Property @{downloadLink="$LegacyDownloadLink";specificVersion="$SpecificVersion";effectiveVersion="$EffectiveVersion";type='legacy'}
|
||||
Say-Verbose "Generated legacy link $LegacyDownloadLink with version $EffectiveVersion"
|
||||
}
|
||||
|
||||
if (-Not $DryRun) {
|
||||
Say-Verbose "Checking if the version $EffectiveVersion is already installed"
|
||||
if (Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $EffectiveVersion)
|
||||
{
|
||||
Say "$assetName with version '$EffectiveVersion' is already installed."
|
||||
Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
Say-Verbose "Failed to acquire download links from feed $feed. Exception: $_"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($DownloadLinks.count -eq 0) {
|
||||
throw "Failed to resolve the exact version number."
|
||||
}
|
||||
|
||||
if ($DryRun) {
|
||||
PrintDryRunOutput $MyInvocation $DownloadLinks
|
||||
return
|
||||
}
|
||||
|
||||
Prepare-Install-Directory
|
||||
|
||||
$ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName())
|
||||
Say-Verbose "Zip path: $ZipPath"
|
||||
|
||||
$DownloadFailed = $false
|
||||
$DownloadSucceeded = $false
|
||||
$DownloadedLink = $null
|
||||
$ErrorMessages = @()
|
||||
|
||||
$PrimaryDownloadStatusCode = 0
|
||||
$LegacyDownloadStatusCode = 0
|
||||
foreach ($link in $DownloadLinks)
|
||||
{
|
||||
Say-Verbose "Downloading `"$($link.type)`" link $($link.downloadLink)"
|
||||
|
||||
$PrimaryDownloadFailedMsg = ""
|
||||
$LegacyDownloadFailedMsg = ""
|
||||
|
||||
Say "Downloading primary link $DownloadLink"
|
||||
try {
|
||||
DownloadFile -Source $DownloadLink -OutPath $ZipPath
|
||||
DownloadFile -Source $link.downloadLink -OutPath $ZipPath
|
||||
Say-Verbose "Download succeeded."
|
||||
$DownloadSucceeded = $true
|
||||
$DownloadedLink = $link
|
||||
break
|
||||
}
|
||||
catch {
|
||||
$StatusCode = $null
|
||||
$ErrorMessage = $null
|
||||
|
||||
if ($PSItem.Exception.Data.Contains("StatusCode")) {
|
||||
$PrimaryDownloadStatusCode = $PSItem.Exception.Data["StatusCode"]
|
||||
$StatusCode = $PSItem.Exception.Data["StatusCode"]
|
||||
}
|
||||
|
||||
if ($PSItem.Exception.Data.Contains("ErrorMessage")) {
|
||||
$PrimaryDownloadFailedMsg = $PSItem.Exception.Data["ErrorMessage"]
|
||||
$ErrorMessage = $PSItem.Exception.Data["ErrorMessage"]
|
||||
} else {
|
||||
$PrimaryDownloadFailedMsg = $PSItem.Exception.Message
|
||||
$ErrorMessage = $PSItem.Exception.Message
|
||||
}
|
||||
|
||||
if ($PrimaryDownloadStatusCode -eq 404) {
|
||||
Say "The resource at $DownloadLink is not available."
|
||||
} else {
|
||||
Say $PSItem.Exception.Message
|
||||
Say-Verbose "Download failed with status code $StatusCode. Error message: $ErrorMessage"
|
||||
$ErrorMessages += "Downloading from `"$($link.type)`" link has failed with error:`nUri: $($link.downloadLink)`nStatusCode: $StatusCode`nError: $ErrorMessage"
|
||||
}
|
||||
|
||||
# This link failed. Clean up before trying the next one.
|
||||
SafeRemoveFile -Path $ZipPath
|
||||
|
||||
if ($LegacyDownloadLink) {
|
||||
$DownloadLink = $LegacyDownloadLink
|
||||
$ZipPath = [System.IO.Path]::combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName())
|
||||
Say-Verbose "Legacy zip path: $ZipPath"
|
||||
Say "Downloading legacy link $DownloadLink"
|
||||
try {
|
||||
DownloadFile -Source $DownloadLink -OutPath $ZipPath
|
||||
}
|
||||
catch {
|
||||
if ($PSItem.Exception.Data.Contains("StatusCode")) {
|
||||
$LegacyDownloadStatusCode = $PSItem.Exception.Data["StatusCode"]
|
||||
}
|
||||
|
||||
if ($PSItem.Exception.Data.Contains("ErrorMessage")) {
|
||||
$LegacyDownloadFailedMsg = $PSItem.Exception.Data["ErrorMessage"]
|
||||
} else {
|
||||
$LegacyDownloadFailedMsg = $PSItem.Exception.Message
|
||||
if (-not $DownloadSucceeded) {
|
||||
foreach ($ErrorMessage in $ErrorMessages) {
|
||||
Say-Error $ErrorMessages
|
||||
}
|
||||
|
||||
if ($LegacyDownloadStatusCode -eq 404) {
|
||||
Say "The resource at $DownloadLink is not available."
|
||||
} else {
|
||||
Say $PSItem.Exception.Message
|
||||
throw "Could not find `"$assetName`" with version = $($DownloadLinks[0].effectiveVersion)`nRefer to: https://aka.ms/dotnet-os-lifecycle for information on .NET support"
|
||||
}
|
||||
|
||||
SafeRemoveFile -Path $ZipPath
|
||||
$DownloadFailed = $true
|
||||
}
|
||||
}
|
||||
else {
|
||||
$DownloadFailed = $true
|
||||
}
|
||||
}
|
||||
|
||||
if ($DownloadFailed) {
|
||||
if (($PrimaryDownloadStatusCode -eq 404) -and ((-not $LegacyDownloadLink) -or ($LegacyDownloadStatusCode -eq 404))) {
|
||||
throw "Could not find `"$assetName`" with version = $SpecificVersion`nRefer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support"
|
||||
} else {
|
||||
# 404-NotFound is an expected response if it goes from only one of the links, do not show that error.
|
||||
# If primary path is available (not 404-NotFound) then show the primary error else show the legacy error.
|
||||
if ($PrimaryDownloadStatusCode -ne 404) {
|
||||
throw "Could not download `"$assetName`" with version = $SpecificVersion`r`n$PrimaryDownloadFailedMsg"
|
||||
}
|
||||
if (($LegacyDownloadLink) -and ($LegacyDownloadStatusCode -ne 404)) {
|
||||
throw "Could not download `"$assetName`" with version = $SpecificVersion`r`n$LegacyDownloadFailedMsg"
|
||||
}
|
||||
throw "Could not download `"$assetName`" with version = $SpecificVersion"
|
||||
}
|
||||
}
|
||||
|
||||
Say "Extracting zip from $DownloadLink"
|
||||
Say "Extracting the archive."
|
||||
Extract-Dotnet-Package -ZipPath $ZipPath -OutPath $InstallRoot
|
||||
|
||||
# Check if the SDK version is installed; if not, fail the installation.
|
||||
$isAssetInstalled = $false
|
||||
|
||||
# if the version contains "RTM" or "servicing"; check if a 'release-type' SDK version is installed.
|
||||
if ($SpecificVersion -Match "rtm" -or $SpecificVersion -Match "servicing") {
|
||||
$ReleaseVersion = $SpecificVersion.Split("-")[0]
|
||||
if ($DownloadedLink.effectiveVersion -Match "rtm" -or $DownloadedLink.effectiveVersion -Match "servicing") {
|
||||
$ReleaseVersion = $DownloadedLink.effectiveVersion.Split("-")[0]
|
||||
Say-Verbose "Checking installation: version = $ReleaseVersion"
|
||||
$isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $ReleaseVersion
|
||||
}
|
||||
|
||||
# Check if the SDK version is installed.
|
||||
if (!$isAssetInstalled) {
|
||||
Say-Verbose "Checking installation: version = $SpecificVersion"
|
||||
$isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $SpecificVersion
|
||||
Say-Verbose "Checking installation: version = $($DownloadedLink.effectiveVersion)"
|
||||
$isAssetInstalled = Is-Dotnet-Package-Installed -InstallRoot $InstallRoot -RelativePathToPackage $dotnetPackageRelativePath -SpecificVersion $DownloadedLink.effectiveVersion
|
||||
}
|
||||
|
||||
# Version verification failed. More likely something is wrong either with the downloaded content or with the verification algorithm.
|
||||
if (!$isAssetInstalled) {
|
||||
Say-Error "Failed to verify the version of installed `"$assetName`".`nInstallation source: $DownloadLink.`nInstallation location: $InstallRoot.`nReport the bug at https://github.com/dotnet/install-scripts/issues."
|
||||
throw "`"$assetName`" with version = $SpecificVersion failed to install with an unknown error."
|
||||
Say-Error "Failed to verify the version of installed `"$assetName`".`nInstallation source: $($DownloadedLink.downloadLink).`nInstallation location: $InstallRoot.`nReport the bug at https://github.com/dotnet/install-scripts/issues."
|
||||
throw "`"$assetName`" with version = $($DownloadedLink.effectiveVersion) failed to install with an unknown error."
|
||||
}
|
||||
|
||||
SafeRemoveFile -Path $ZipPath
|
||||
|
||||
Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot -BinFolderRelativePath $BinFolderRelativePath
|
||||
Prepend-Sdk-InstallRoot-To-Path -InstallRoot $InstallRoot
|
||||
|
||||
Say "Note that the script does not resolve dependencies during installation."
|
||||
Say "To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install/windows#dependencies"
|
||||
Say "Installation finished"
|
||||
|
||||
# SIG # Begin signature block
|
||||
# MIIjhgYJKoZIhvcNAQcCoIIjdzCCI3MCAQExDzANBglghkgBZQMEAgEFADB5Bgor
|
||||
# MIInoQYJKoZIhvcNAQcCoIInkjCCJ44CAQExDzANBglghkgBZQMEAgEFADB5Bgor
|
||||
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
|
||||
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDO8obeUp97UA1H
|
||||
# qy3NSLDwxxLLlEbGxeCzMOcKVT/3eKCCDYEwggX/MIID56ADAgECAhMzAAAB32vw
|
||||
# LpKnSrTQAAAAAAHfMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAY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AQEEVTBTMFEGCCsGAQUFBzAChkVodHRwOi8vd3d3
|
||||
# Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2NlcnRzL01pY0NvZFNpZ1BDQTIwMTFfMjAx
|
||||
# MS0wNy0wOC5jcnQwDAYDVR0TAQH/BAIwADANBgkqhkiG9w0BAQsFAAOCAgEAnnqH
|
||||
# tDyYUFaVAkvAK0eqq6nhoL95SZQu3RnpZ7tdQ89QR3++7A+4hrr7V4xxmkB5BObS
|
||||
# 0YK+MALE02atjwWgPdpYQ68WdLGroJZHkbZdgERG+7tETFl3aKF4KpoSaGOskZXp
|
||||
# TPnCaMo2PXoAMVMGpsQEQswimZq3IQ3nRQfBlJ0PoMMcN/+Pks8ZTL1BoPYsJpok
|
||||
# t6cql59q6CypZYIwgyJ892HpttybHKg1ZtQLUlSXccRMlugPgEcNZJagPEgPYni4
|
||||
# b11snjRAgf0dyQ0zI9aLXqTxWUU5pCIFiPT0b2wsxzRqCtyGqpkGM8P9GazO8eao
|
||||
# mVItCYBcJSByBx/pS0cSYwBBHAZxJODUqxSXoSGDvmTfqUJXntnWkL4okok1FiCD
|
||||
# Z4jpyXOQunb6egIXvkgQ7jb2uO26Ow0m8RwleDvhOMrnHsupiOPbozKroSa6paFt
|
||||
# VSh89abUSooR8QdZciemmoFhcWkEwFg4spzvYNP4nIs193261WyTaRMZoceGun7G
|
||||
# CT2Rl653uUj+F+g94c63AhzSq4khdL4HlFIP2ePv29smfUnHtGq6yYFDLnT0q/Y+
|
||||
# Di3jwloF8EWkkHRtSuXlFUbTmwr/lDDgbpZiKhLS7CBTDj32I0L5i532+uHczw82
|
||||
# oZDmYmYmIUSMbZOgS65h797rj5JJ6OkeEUJoAVwwggd6MIIFYqADAgECAgphDpDS
|
||||
# MS0wNy0wOC5jcnQwDAYDVR0TAQH/BAIwADANBgkqhkiG9w0BAQsFAAOCAgEAFkk3
|
||||
# uSxkTEBh1NtAl7BivIEsAWdgX1qZ+EdZMYbQKasY6IhSLXRMxF1B3OKdR9K/kccp
|
||||
# kvNcGl8D7YyYS4mhCUMBR+VLrg3f8PUj38A9V5aiY2/Jok7WZFOAmjPRNNGnyeg7
|
||||
# l0lTiThFqE+2aOs6+heegqAdelGgNJKRHLWRuhGKuLIw5lkgx9Ky+QvZrn/Ddi8u
|
||||
# TIgWKp+MGG8xY6PBvvjgt9jQShlnPrZ3UY8Bvwy6rynhXBaV0V0TTL0gEx7eh/K1
|
||||
# o8Miaru6s/7FyqOLeUS4vTHh9TgBL5DtxCYurXbSBVtL1Fj44+Od/6cmC9mmvrti
|
||||
# yG709Y3Rd3YdJj2f3GJq7Y7KdWq0QYhatKhBeg4fxjhg0yut2g6aM1mxjNPrE48z
|
||||
# 6HWCNGu9gMK5ZudldRw4a45Z06Aoktof0CqOyTErvq0YjoE4Xpa0+87T/PVUXNqf
|
||||
# 7Y+qSU7+9LtLQuMYR4w3cSPjuNusvLf9gBnch5RqM7kaDtYWDgLyB42EfsxeMqwK
|
||||
# WwA+TVi0HrWRqfSx2olbE56hJcEkMjOSKz3sRuupFCX3UroyYf52L+2iVTrda8XW
|
||||
# esPG62Mnn3T8AuLfzeJFuAbfOSERx7IFZO92UPoXE1uEjL5skl1yTZB3MubgOA4F
|
||||
# 8KoRNhviFAEST+nG8c8uIsbZeb08SeYQMqjVEmkwggd6MIIFYqADAgECAgphDpDS
|
||||
# AAAAAAADMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQGEwJVUzETMBEGA1UECBMK
|
||||
# V2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0
|
||||
# IENvcnBvcmF0aW9uMTIwMAYDVQQDEylNaWNyb3NvZnQgUm9vdCBDZXJ0aWZpY2F0
|
||||
@ -1284,119 +1326,141 @@ Say "Installation finished"
|
||||
# xw4o7t5lL+yX9qFcltgA1qFGvVnzl6UJS0gQmYAf0AApxbGbpT9Fdx41xtKiop96
|
||||
# eiL6SJUfq/tHI4D1n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RT0Va/ooBXCV7Uny7PlCkRIQRTSJDy/kSXpsL22CTEHw6mU0jEU99k
|
||||
# OL4uwu+aVnolWFlpbiJjQxBqfT3plBLIg88=
|
||||
# b3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1w
|
||||
# IFBDQSAyMDEwAhMzAAABnA+mTWHSnksoAAEAAAGcMCIEIOSl7GUcmDL8AU+F0I3A
|
||||
# iZQESHSkml1QPlOc3M8uqdF0MA0GCSqGSIb3DQEBCwUABIICAHV226l2xxnkjTdh
|
||||
# Q6wi7u8betBvFNfYYn5cXwy+NoU30JjQ3ynnmNSB+TQVlmcthi8duP8dud+NU5xc
|
||||
# +1jBTcJTHjWk/TDZUYpB/xNqsgUTJ8fnebVZhioPJhmFJMeQztT4NTD1ZbeJWO4O
|
||||
# EABDpRqyns2eQptCrKcPIypjvdDeYfkwjgnUEyyaTZRHPZ2kNOLY6kO9feKfntFW
|
||||
# 8YUIaas2IzI5GcGm+kw1efHveG0WvUpeGuFKsTUA6Jb18mOyamafu32ftD5t5LXV
|
||||
# +GMgnaJLgdogAAGwK0GiB47YNIvPlKD6bGnyTR3KNYheI1GI38w0knOecCC4NW0k
|
||||
# 21qROWJdnkKLKTtBX344yTnJbbKoIPzGgyWCzSINS2SD4JHzgTu8dsmMMJWwcEZh
|
||||
# BLyrzmd/vWrjUFQFXVf6RZmJJVvF28s7LWrpXPVTR8Al75j8KqyZKou4fZvyaHtx
|
||||
# S6K0jIqavLWqWd4wvx9seCtA0Pz1GWrBZADIRHG8d8cFoY95Z99z84NM81qXB246
|
||||
# IsxU2iW+96zMJriMNEKaLHzlgFoWsoXLDQhuQItjwIvzwmwygwx0MxqoFYm+lDWG
|
||||
# 8/KtSh47aZicAlwqNVGy3MZHDnX69kysQsrWoe2wDhJ3eHJ4zRL2WHVagz26L7xF
|
||||
# oSkLphLv0GiFseJhPvXGQPypnyN8
|
||||
# SIG # End signature block
|
||||
|
546
externals/install-dotnet.sh
vendored
546
externals/install-dotnet.sh
vendored
@ -135,6 +135,31 @@ get_legacy_os_name_from_platform() {
|
||||
return 1
|
||||
}
|
||||
|
||||
get_legacy_os_name() {
|
||||
eval $invocation
|
||||
|
||||
local uname=$(uname)
|
||||
if [ "$uname" = "Darwin" ]; then
|
||||
echo "osx"
|
||||
return 0
|
||||
elif [ -n "$runtime_id" ]; then
|
||||
echo $(get_legacy_os_name_from_platform "${runtime_id%-*}" || echo "${runtime_id%-*}")
|
||||
return 0
|
||||
else
|
||||
if [ -e /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
os=$(get_legacy_os_name_from_platform "$ID${VERSION_ID:+.${VERSION_ID}}" || echo "")
|
||||
if [ -n "$os" ]; then
|
||||
echo "$os"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
say_verbose "Distribution specific OS name and version could not be detected: UName = $uname"
|
||||
return 1
|
||||
}
|
||||
|
||||
get_linux_platform_name() {
|
||||
eval $invocation
|
||||
|
||||
@ -174,8 +199,8 @@ get_current_os_name() {
|
||||
echo "freebsd"
|
||||
return 0
|
||||
elif [ "$uname" = "Linux" ]; then
|
||||
local linux_platform_name
|
||||
linux_platform_name="$(get_linux_platform_name)" || { echo "linux" && return 0 ; }
|
||||
local linux_platform_name=""
|
||||
linux_platform_name="$(get_linux_platform_name)" || true
|
||||
|
||||
if [ "$linux_platform_name" = "rhel.6" ]; then
|
||||
echo $linux_platform_name
|
||||
@ -196,39 +221,13 @@ get_current_os_name() {
|
||||
return 1
|
||||
}
|
||||
|
||||
get_legacy_os_name() {
|
||||
eval $invocation
|
||||
|
||||
local uname=$(uname)
|
||||
if [ "$uname" = "Darwin" ]; then
|
||||
echo "osx"
|
||||
return 0
|
||||
elif [ -n "$runtime_id" ]; then
|
||||
echo $(get_legacy_os_name_from_platform "${runtime_id%-*}" || echo "${runtime_id%-*}")
|
||||
return 0
|
||||
else
|
||||
if [ -e /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
os=$(get_legacy_os_name_from_platform "$ID${VERSION_ID:+.${VERSION_ID}}" || echo "")
|
||||
if [ -n "$os" ]; then
|
||||
echo "$os"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
say_verbose "Distribution specific OS name and version could not be detected: UName = $uname"
|
||||
return 1
|
||||
}
|
||||
|
||||
machine_has() {
|
||||
eval $invocation
|
||||
|
||||
hash "$1" > /dev/null 2>&1
|
||||
command -v "$1" > /dev/null 2>&1
|
||||
return $?
|
||||
}
|
||||
|
||||
|
||||
check_min_reqs() {
|
||||
local hasMinimum=false
|
||||
if machine_has "curl"; then
|
||||
@ -321,11 +320,13 @@ get_normalized_architecture_from_architecture() {
|
||||
eval $invocation
|
||||
|
||||
local architecture="$(to_lowercase "$1")"
|
||||
case "$architecture" in
|
||||
\<auto\>)
|
||||
echo "$(get_normalized_architecture_from_architecture "$(get_machine_architecture)")"
|
||||
|
||||
if [[ $architecture == \<auto\> ]]; then
|
||||
echo "$(get_machine_architecture)"
|
||||
return 0
|
||||
;;
|
||||
fi
|
||||
|
||||
case "$architecture" in
|
||||
amd64|x64)
|
||||
echo "x64"
|
||||
return 0
|
||||
@ -425,6 +426,7 @@ get_normalized_channel() {
|
||||
get_normalized_product() {
|
||||
eval $invocation
|
||||
|
||||
local product=""
|
||||
local runtime="$(to_lowercase "$1")"
|
||||
if [[ "$runtime" == "dotnet" ]]; then
|
||||
product="dotnet-runtime"
|
||||
@ -446,7 +448,7 @@ get_normalized_product() {
|
||||
|
||||
# args:
|
||||
# version_text - stdin
|
||||
get_version_from_version_info() {
|
||||
get_version_from_latestversion_file_content() {
|
||||
eval $invocation
|
||||
|
||||
cat | tail -n 1 | sed 's/\r$//'
|
||||
@ -478,7 +480,7 @@ is_dotnet_package_installed() {
|
||||
# azure_feed - $1
|
||||
# channel - $2
|
||||
# normalized_architecture - $3
|
||||
get_latest_version_info() {
|
||||
get_version_from_latestversion_file() {
|
||||
eval $invocation
|
||||
|
||||
local azure_feed="$1"
|
||||
@ -487,24 +489,24 @@ get_latest_version_info() {
|
||||
|
||||
local version_file_url=null
|
||||
if [[ "$runtime" == "dotnet" ]]; then
|
||||
version_file_url="$uncached_feed/Runtime/$channel/latest.version"
|
||||
version_file_url="$azure_feed/Runtime/$channel/latest.version"
|
||||
elif [[ "$runtime" == "aspnetcore" ]]; then
|
||||
version_file_url="$uncached_feed/aspnetcore/Runtime/$channel/latest.version"
|
||||
version_file_url="$azure_feed/aspnetcore/Runtime/$channel/latest.version"
|
||||
elif [ -z "$runtime" ]; then
|
||||
version_file_url="$uncached_feed/Sdk/$channel/latest.version"
|
||||
version_file_url="$azure_feed/Sdk/$channel/latest.version"
|
||||
else
|
||||
say_err "Invalid value for \$runtime"
|
||||
return 1
|
||||
fi
|
||||
say_verbose "get_latest_version_info: latest url: $version_file_url"
|
||||
say_verbose "get_version_from_latestversion_file: latest url: $version_file_url"
|
||||
|
||||
download "$version_file_url"
|
||||
return $?
|
||||
download "$version_file_url" || return $?
|
||||
return 0
|
||||
}
|
||||
|
||||
# args:
|
||||
# json_file - $1
|
||||
parse_jsonfile_for_version() {
|
||||
parse_globaljson_file_for_version() {
|
||||
eval $invocation
|
||||
|
||||
local json_file="$1"
|
||||
@ -560,9 +562,9 @@ get_specific_version_from_version() {
|
||||
if [ -z "$json_file" ]; then
|
||||
if [[ "$version" == "latest" ]]; then
|
||||
local version_info
|
||||
version_info="$(get_latest_version_info "$azure_feed" "$channel" "$normalized_architecture" false)" || return 1
|
||||
version_info="$(get_version_from_latestversion_file "$azure_feed" "$channel" "$normalized_architecture" false)" || return 1
|
||||
say_verbose "get_specific_version_from_version: version_info=$version_info"
|
||||
echo "$version_info" | get_version_from_version_info
|
||||
echo "$version_info" | get_version_from_latestversion_file_content
|
||||
return 0
|
||||
else
|
||||
echo "$version"
|
||||
@ -570,7 +572,7 @@ get_specific_version_from_version() {
|
||||
fi
|
||||
else
|
||||
local version_info
|
||||
version_info="$(parse_jsonfile_for_version "$json_file")" || return 1
|
||||
version_info="$(parse_globaljson_file_for_version "$json_file")" || return 1
|
||||
echo "$version_info"
|
||||
return 0
|
||||
fi
|
||||
@ -635,14 +637,16 @@ get_specific_product_version() {
|
||||
|
||||
if machine_has "curl"
|
||||
then
|
||||
specific_product_version=$(curl -s --fail "${download_link}${feed_credential}")
|
||||
if [ $? = 0 ]; then
|
||||
if ! specific_product_version=$(curl -s --fail "${download_link}${feed_credential}" 2>&1); then
|
||||
continue
|
||||
else
|
||||
echo "${specific_product_version//[$'\t\r\n']}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
elif machine_has "wget"
|
||||
then
|
||||
specific_product_version=$(wget -qO- "${download_link}${feed_credential}")
|
||||
specific_product_version=$(wget -qO- "${download_link}${feed_credential}" 2>&1)
|
||||
if [ $? = 0 ]; then
|
||||
echo "${specific_product_version//[$'\t\r\n']}"
|
||||
return 0
|
||||
@ -907,7 +911,7 @@ get_http_header_curl() {
|
||||
fi
|
||||
|
||||
curl_options="-I -sSL --retry 5 --retry-delay 2 --connect-timeout 15 "
|
||||
curl $curl_options "$remote_path_with_credential" || return 1
|
||||
curl $curl_options "$remote_path_with_credential" 2>&1 || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
@ -918,15 +922,25 @@ get_http_header_wget() {
|
||||
eval $invocation
|
||||
local remote_path="$1"
|
||||
local disable_feed_credential="$2"
|
||||
local wget_options="-q -S --spider --tries 5 "
|
||||
|
||||
local wget_options_extra=''
|
||||
|
||||
# Test for options that aren't supported on all wget implementations.
|
||||
if [[ $(wget -h 2>&1 | grep -E 'waitretry|connect-timeout') ]]; then
|
||||
wget_options_extra="--waitretry 2 --connect-timeout 15 "
|
||||
else
|
||||
say "wget extra options are unavailable for this environment"
|
||||
fi
|
||||
|
||||
remote_path_with_credential="$remote_path"
|
||||
if [ "$disable_feed_credential" = false ]; then
|
||||
remote_path_with_credential+="$feed_credential"
|
||||
fi
|
||||
|
||||
wget_options="-q -S --spider --tries 5 --waitretry 2 --connect-timeout 15 "
|
||||
wget $wget_options "$remote_path_with_credential" 2>&1 || return 1
|
||||
return 0
|
||||
wget $wget_options $wget_options_extra "$remote_path_with_credential" 2>&1
|
||||
|
||||
return $?
|
||||
}
|
||||
|
||||
# args:
|
||||
@ -988,9 +1002,9 @@ downloadcurl() {
|
||||
local curl_options="--retry 20 --retry-delay 2 --connect-timeout 15 -sSL -f --create-dirs "
|
||||
local failed=false
|
||||
if [ -z "$out_path" ]; then
|
||||
curl $curl_options "$remote_path_with_credential" || failed=true
|
||||
curl $curl_options "$remote_path_with_credential" 2>&1 || failed=true
|
||||
else
|
||||
curl $curl_options -o "$out_path" "$remote_path_with_credential" || failed=true
|
||||
curl $curl_options -o "$out_path" "$remote_path_with_credential" 2>&1 || failed=true
|
||||
fi
|
||||
if [ "$failed" = true ]; then
|
||||
local disable_feed_credential=false
|
||||
@ -1016,14 +1030,27 @@ downloadwget() {
|
||||
local out_path="${2:-}"
|
||||
# Append feed_credential as late as possible before calling wget to avoid logging feed_credential
|
||||
local remote_path_with_credential="${remote_path}${feed_credential}"
|
||||
local wget_options="--tries 20 --waitretry 2 --connect-timeout 15 "
|
||||
local failed=false
|
||||
if [ -z "$out_path" ]; then
|
||||
wget -q $wget_options -O - "$remote_path_with_credential" || failed=true
|
||||
local wget_options="--tries 20 "
|
||||
|
||||
local wget_options_extra=''
|
||||
local wget_result=''
|
||||
|
||||
# Test for options that aren't supported on all wget implementations.
|
||||
if [[ $(wget -h 2>&1 | grep -E 'waitretry|connect-timeout') ]]; then
|
||||
wget_options_extra="--waitretry 2 --connect-timeout 15 "
|
||||
else
|
||||
wget $wget_options -O "$out_path" "$remote_path_with_credential" || failed=true
|
||||
say "wget extra options are unavailable for this environment"
|
||||
fi
|
||||
if [ "$failed" = true ]; then
|
||||
|
||||
if [ -z "$out_path" ]; then
|
||||
wget -q $wget_options $wget_options_extra -O - "$remote_path_with_credential" 2>&1
|
||||
wget_result=$?
|
||||
else
|
||||
wget $wget_options $wget_options_extra -O "$out_path" "$remote_path_with_credential" 2>&1
|
||||
wget_result=$?
|
||||
fi
|
||||
|
||||
if [[ $wget_result != 0 ]]; then
|
||||
local disable_feed_credential=false
|
||||
local response=$(get_http_header_wget $remote_path $disable_feed_credential)
|
||||
http_code=$( echo "$response" | awk '/^ HTTP/{print $2}' | tail -1 )
|
||||
@ -1034,6 +1061,7 @@ downloadwget() {
|
||||
say_verbose "$download_error_msg"
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
@ -1090,11 +1118,197 @@ get_download_link_from_aka_ms() {
|
||||
fi
|
||||
}
|
||||
|
||||
get_feeds_to_use()
|
||||
{
|
||||
feeds=(
|
||||
"https://dotnetcli.azureedge.net/dotnet"
|
||||
"https://dotnetbuilds.azureedge.net/public"
|
||||
)
|
||||
|
||||
if [[ -n "$azure_feed" ]]; then
|
||||
feeds=("$azure_feed")
|
||||
fi
|
||||
|
||||
if [[ "$no_cdn" == "true" ]]; then
|
||||
feeds=(
|
||||
"https://dotnetcli.blob.core.windows.net/dotnet"
|
||||
"https://dotnetbuilds.blob.core.windows.net/public"
|
||||
)
|
||||
|
||||
if [[ -n "$uncached_feed" ]]; then
|
||||
feeds=("$uncached_feed")
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# THIS FUNCTION MAY EXIT (if the determined version is already installed).
|
||||
generate_download_links() {
|
||||
|
||||
download_links=()
|
||||
specific_versions=()
|
||||
effective_versions=()
|
||||
link_types=()
|
||||
|
||||
# If generate_akams_links returns false, no fallback to old links. Just terminate.
|
||||
# This function may also 'exit' (if the determined version is already installed).
|
||||
generate_akams_links || return
|
||||
|
||||
# Check other feeds only if we haven't been able to find an aka.ms link.
|
||||
if [[ "${#download_links[@]}" -lt 1 ]]; then
|
||||
for feed in ${feeds[@]}
|
||||
do
|
||||
# generate_regular_links may also 'exit' (if the determined version is already installed).
|
||||
generate_regular_links $feed || return
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ "${#download_links[@]}" -eq 0 ]]; then
|
||||
say_err "Failed to resolve the exact version number."
|
||||
return 1
|
||||
fi
|
||||
|
||||
say_verbose "Generated ${#download_links[@]} links."
|
||||
for link_index in ${!download_links[@]}
|
||||
do
|
||||
say_verbose "Link $link_index: ${link_types[$link_index]}, ${effective_versions[$link_index]}, ${download_links[$link_index]}"
|
||||
done
|
||||
}
|
||||
|
||||
# THIS FUNCTION MAY EXIT (if the determined version is already installed).
|
||||
generate_akams_links() {
|
||||
local valid_aka_ms_link=true;
|
||||
|
||||
normalized_version="$(to_lowercase "$version")"
|
||||
if [[ -n "$json_file" || "$normalized_version" != "latest" ]]; then
|
||||
# aka.ms links are not needed when exact version is specified via command or json file
|
||||
return
|
||||
fi
|
||||
|
||||
get_download_link_from_aka_ms || valid_aka_ms_link=false
|
||||
|
||||
if [[ "$valid_aka_ms_link" == true ]]; then
|
||||
say_verbose "Retrieved primary payload URL from aka.ms link: '$aka_ms_download_link'."
|
||||
say_verbose "Downloading using legacy url will not be attempted."
|
||||
|
||||
download_link=$aka_ms_download_link
|
||||
|
||||
#get version from the path
|
||||
IFS='/'
|
||||
read -ra pathElems <<< "$download_link"
|
||||
count=${#pathElems[@]}
|
||||
specific_version="${pathElems[count-2]}"
|
||||
unset IFS;
|
||||
say_verbose "Version: '$specific_version'."
|
||||
|
||||
#Retrieve effective version
|
||||
effective_version="$(get_specific_product_version "$azure_feed" "$specific_version" "$download_link")"
|
||||
|
||||
# Add link info to arrays
|
||||
download_links+=($download_link)
|
||||
specific_versions+=($specific_version)
|
||||
effective_versions+=($effective_version)
|
||||
link_types+=("aka.ms")
|
||||
|
||||
# Check if the SDK version is already installed.
|
||||
if [[ "$dry_run" != true ]] && is_dotnet_package_installed "$install_root" "$asset_relative_path" "$effective_version"; then
|
||||
say "$asset_name with version '$effective_version' is already installed."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
return 0
|
||||
fi
|
||||
|
||||
# if quality is specified - exit with error - there is no fallback approach
|
||||
if [ ! -z "$normalized_quality" ]; then
|
||||
say_err "Failed to locate the latest version in the channel '$normalized_channel' with '$normalized_quality' quality for '$normalized_product', os: '$normalized_os', architecture: '$normalized_architecture'."
|
||||
say_err "Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support."
|
||||
return 1
|
||||
fi
|
||||
say_verbose "Falling back to latest.version file approach."
|
||||
}
|
||||
|
||||
# THIS FUNCTION MAY EXIT (if the determined version is already installed)
|
||||
# args:
|
||||
# feed - $1
|
||||
generate_regular_links() {
|
||||
local feed="$1"
|
||||
local valid_legacy_download_link=true
|
||||
|
||||
specific_version=$(get_specific_version_from_version "$feed" "$channel" "$normalized_architecture" "$version" "$json_file") || specific_version='0'
|
||||
|
||||
if [[ "$specific_version" == '0' ]]; then
|
||||
say_verbose "Failed to resolve the specific version number using feed '$feed'"
|
||||
return
|
||||
fi
|
||||
|
||||
effective_version="$(get_specific_product_version "$feed" "$specific_version")"
|
||||
say_verbose "specific_version=$specific_version"
|
||||
|
||||
download_link="$(construct_download_link "$feed" "$channel" "$normalized_architecture" "$specific_version" "$normalized_os")"
|
||||
say_verbose "Constructed primary named payload URL: $download_link"
|
||||
|
||||
# Add link info to arrays
|
||||
download_links+=($download_link)
|
||||
specific_versions+=($specific_version)
|
||||
effective_versions+=($effective_version)
|
||||
link_types+=("primary")
|
||||
|
||||
legacy_download_link="$(construct_legacy_download_link "$feed" "$channel" "$normalized_architecture" "$specific_version")" || valid_legacy_download_link=false
|
||||
|
||||
if [ "$valid_legacy_download_link" = true ]; then
|
||||
say_verbose "Constructed legacy named payload URL: $legacy_download_link"
|
||||
|
||||
download_links+=($legacy_download_link)
|
||||
specific_versions+=($specific_version)
|
||||
effective_versions+=($effective_version)
|
||||
link_types+=("legacy")
|
||||
else
|
||||
legacy_download_link=""
|
||||
say_verbose "Cound not construct a legacy_download_link; omitting..."
|
||||
fi
|
||||
|
||||
# Check if the SDK version is already installed.
|
||||
if [[ "$dry_run" != true ]] && is_dotnet_package_installed "$install_root" "$asset_relative_path" "$effective_version"; then
|
||||
say "$asset_name with version '$effective_version' is already installed."
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
print_dry_run() {
|
||||
|
||||
say "Payload URLs:"
|
||||
|
||||
for link_index in "${!download_links[@]}"
|
||||
do
|
||||
say "URL #$link_index - ${link_types[$link_index]}: ${download_links[$link_index]}"
|
||||
done
|
||||
|
||||
resolved_version=${specific_versions[0]}
|
||||
repeatable_command="./$script_name --version "\""$resolved_version"\"" --install-dir "\""$install_root"\"" --architecture "\""$normalized_architecture"\"" --os "\""$normalized_os"\"""
|
||||
|
||||
if [ ! -z "$normalized_quality" ]; then
|
||||
repeatable_command+=" --quality "\""$normalized_quality"\"""
|
||||
fi
|
||||
|
||||
if [[ "$runtime" == "dotnet" ]]; then
|
||||
repeatable_command+=" --runtime "\""dotnet"\"""
|
||||
elif [[ "$runtime" == "aspnetcore" ]]; then
|
||||
repeatable_command+=" --runtime "\""aspnetcore"\"""
|
||||
fi
|
||||
|
||||
repeatable_command+="$non_dynamic_parameters"
|
||||
|
||||
if [ -n "$feed_credential" ]; then
|
||||
repeatable_command+=" --feed-credential "\""<feed_credential>"\"""
|
||||
fi
|
||||
|
||||
say "Repeatable invocation: $repeatable_command"
|
||||
}
|
||||
|
||||
calculate_vars() {
|
||||
eval $invocation
|
||||
valid_legacy_download_link=true
|
||||
|
||||
#normalize input variables
|
||||
script_name=$(basename "$0")
|
||||
normalized_architecture="$(get_normalized_architecture_from_architecture "$architecture")"
|
||||
say_verbose "Normalized architecture: '$normalized_architecture'."
|
||||
normalized_os="$(get_normalized_os "$user_defined_os")"
|
||||
@ -1105,76 +1319,8 @@ calculate_vars() {
|
||||
say_verbose "Normalized channel: '$normalized_channel'."
|
||||
normalized_product="$(get_normalized_product "$runtime")"
|
||||
say_verbose "Normalized product: '$normalized_product'."
|
||||
|
||||
#try to get download location from aka.ms link
|
||||
#not applicable when exact version is specified via command or json file
|
||||
normalized_version="$(to_lowercase "$version")"
|
||||
if [[ -z "$json_file" && "$normalized_version" == "latest" ]]; then
|
||||
|
||||
valid_aka_ms_link=true;
|
||||
get_download_link_from_aka_ms || valid_aka_ms_link=false
|
||||
|
||||
if [ "$valid_aka_ms_link" == false ]; then
|
||||
# if quality is specified - exit with error - there is no fallback approach
|
||||
if [ ! -z "$normalized_quality" ]; then
|
||||
say_err "Failed to locate the latest version in the channel '$normalized_channel' with '$normalized_quality' quality for '$normalized_product', os: '$normalized_os', architecture: '$normalized_architecture'."
|
||||
say_err "Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support."
|
||||
return 1
|
||||
fi
|
||||
say_verbose "Falling back to latest.version file approach."
|
||||
else
|
||||
say_verbose "Retrieved primary payload URL from aka.ms link: '$aka_ms_download_link'."
|
||||
download_link=$aka_ms_download_link
|
||||
|
||||
say_verbose "Downloading using legacy url will not be attempted."
|
||||
valid_legacy_download_link=false
|
||||
|
||||
#get version from the path
|
||||
IFS='/'
|
||||
read -ra pathElems <<< "$download_link"
|
||||
count=${#pathElems[@]}
|
||||
specific_version="${pathElems[count-2]}"
|
||||
unset IFS;
|
||||
say_verbose "Version: '$specific_version'."
|
||||
|
||||
#Retrieve product specific version
|
||||
specific_product_version="$(get_specific_product_version "$azure_feed" "$specific_version" "$download_link")"
|
||||
say_verbose "Product specific version: '$specific_product_version'."
|
||||
|
||||
install_root="$(resolve_installation_path "$install_dir")"
|
||||
say_verbose "InstallRoot: '$install_root'."
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
specific_version="$(get_specific_version_from_version "$azure_feed" "$channel" "$normalized_architecture" "$version" "$json_file")"
|
||||
specific_product_version="$(get_specific_product_version "$azure_feed" "$specific_version")"
|
||||
say_verbose "specific_version=$specific_version"
|
||||
if [ -z "$specific_version" ]; then
|
||||
say_err "Could not resolve version information."
|
||||
return 1
|
||||
fi
|
||||
|
||||
download_link="$(construct_download_link "$azure_feed" "$channel" "$normalized_architecture" "$specific_version" "$normalized_os")"
|
||||
say_verbose "Constructed primary named payload URL: $download_link"
|
||||
|
||||
legacy_download_link="$(construct_legacy_download_link "$azure_feed" "$channel" "$normalized_architecture" "$specific_version")" || valid_legacy_download_link=false
|
||||
|
||||
if [ "$valid_legacy_download_link" = true ]; then
|
||||
say_verbose "Constructed legacy named payload URL: $legacy_download_link"
|
||||
else
|
||||
say_verbose "Cound not construct a legacy_download_link; omitting..."
|
||||
fi
|
||||
|
||||
install_root="$(resolve_installation_path "$install_dir")"
|
||||
say_verbose "InstallRoot: $install_root"
|
||||
}
|
||||
|
||||
install_dotnet() {
|
||||
eval $invocation
|
||||
local download_failed=false
|
||||
local asset_name=''
|
||||
local asset_relative_path=''
|
||||
|
||||
if [[ "$runtime" == "dotnet" ]]; then
|
||||
asset_relative_path="shared/Microsoft.NETCore.App"
|
||||
@ -1185,84 +1331,52 @@ install_dotnet() {
|
||||
elif [ -z "$runtime" ]; then
|
||||
asset_relative_path="sdk"
|
||||
asset_name=".NET Core SDK"
|
||||
else
|
||||
say_err "Invalid value for \$runtime"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if the SDK version is already installed.
|
||||
if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_version"; then
|
||||
say "$asset_name version $specific_version is already installed."
|
||||
return 0
|
||||
fi
|
||||
get_feeds_to_use
|
||||
}
|
||||
|
||||
install_dotnet() {
|
||||
eval $invocation
|
||||
local download_failed=false
|
||||
local download_completed=false
|
||||
|
||||
mkdir -p "$install_root"
|
||||
zip_path="$(mktemp "$temporary_file_template")"
|
||||
say_verbose "Zip path: $zip_path"
|
||||
|
||||
for link_index in "${!download_links[@]}"
|
||||
do
|
||||
download_link="${download_links[$link_index]}"
|
||||
specific_version="${specific_versions[$link_index]}"
|
||||
effective_version="${effective_versions[$link_index]}"
|
||||
link_type="${link_types[$link_index]}"
|
||||
|
||||
# Failures are normal in the non-legacy case for ultimately legacy downloads.
|
||||
# Do not output to stderr, since output to stderr is considered an error.
|
||||
say "Downloading primary link $download_link"
|
||||
say "Attempting to download using $link_type link $download_link"
|
||||
|
||||
# The download function will set variables $http_code and $download_error_msg in case of failure.
|
||||
download "$download_link" "$zip_path" 2>&1 || download_failed=true
|
||||
|
||||
# if the download fails, download the legacy_download_link
|
||||
if [ "$download_failed" = true ]; then
|
||||
primary_path_http_code="$http_code"; primary_path_download_error_msg="$download_error_msg"
|
||||
case $primary_path_http_code in
|
||||
404)
|
||||
say "The resource at $download_link is not available."
|
||||
;;
|
||||
*)
|
||||
say "$primary_path_download_error_msg"
|
||||
;;
|
||||
esac
|
||||
rm -f "$zip_path" 2>&1 && say_verbose "Temporary zip file $zip_path was removed"
|
||||
if [ "$valid_legacy_download_link" = true ]; then
|
||||
download_failed=false
|
||||
download_link="$legacy_download_link"
|
||||
zip_path="$(mktemp "$temporary_file_template")"
|
||||
say_verbose "Legacy zip path: $zip_path"
|
||||
|
||||
say "Downloading legacy link $download_link"
|
||||
|
||||
# The download function will set variables $http_code and $download_error_msg in case of failure.
|
||||
download "$download_link" "$zip_path" 2>&1 || download_failed=true
|
||||
|
||||
if [ "$download_failed" = true ]; then
|
||||
legacy_path_http_code="$http_code"; legacy_path_download_error_msg="$download_error_msg"
|
||||
case $legacy_path_http_code in
|
||||
case $http_code in
|
||||
404)
|
||||
say "The resource at $download_link is not available."
|
||||
say "The resource at $link_type link '$download_link' is not available."
|
||||
;;
|
||||
*)
|
||||
say "$legacy_path_download_error_msg"
|
||||
say "Failed to download $link_type link '$download_link': $download_error_msg"
|
||||
;;
|
||||
esac
|
||||
rm -f "$zip_path" 2>&1 && say_verbose "Temporary zip file $zip_path was removed"
|
||||
else
|
||||
download_completed=true
|
||||
break
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$download_failed" = true ]; then
|
||||
if [[ "$primary_path_http_code" = "404" && ( "$valid_legacy_download_link" = false || "$legacy_path_http_code" = "404") ]]; then
|
||||
if [[ "$download_completed" == false ]]; then
|
||||
say_err "Could not find \`$asset_name\` with version = $specific_version"
|
||||
say_err "Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support"
|
||||
else
|
||||
say_err "Could not download: \`$asset_name\` with version = $specific_version"
|
||||
# 404-NotFound is an expected response if it goes from only one of the links, do not show that error.
|
||||
# If primary path is available (not 404-NotFound) then show the primary error else show the legacy error.
|
||||
if [ "$primary_path_http_code" != "404" ]; then
|
||||
say_err "$primary_path_download_error_msg"
|
||||
return 1
|
||||
fi
|
||||
if [[ "$valid_legacy_download_link" = true && "$legacy_path_http_code" != "404" ]]; then
|
||||
say_err "$legacy_path_download_error_msg"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
return 1
|
||||
fi
|
||||
|
||||
@ -1283,14 +1397,14 @@ install_dotnet() {
|
||||
fi
|
||||
|
||||
# Check if the standard SDK version is installed.
|
||||
say_verbose "Checking installation: version = $specific_product_version"
|
||||
if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_product_version"; then
|
||||
say_verbose "Checking installation: version = $effective_version"
|
||||
if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$effective_version"; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Version verification failed. More likely something is wrong either with the downloaded content or with the verification algorithm.
|
||||
say_err "Failed to verify the version of installed \`$asset_name\`.\nInstallation source: $download_link.\nInstallation location: $install_root.\nReport the bug at https://github.com/dotnet/install-scripts/issues."
|
||||
say_err "\`$asset_name\` with version = $specific_product_version failed to install with an unknown error."
|
||||
say_err "\`$asset_name\` with version = $effective_version failed to install with an error."
|
||||
return 1
|
||||
}
|
||||
|
||||
@ -1308,8 +1422,8 @@ architecture="<auto>"
|
||||
dry_run=false
|
||||
no_path=false
|
||||
no_cdn=false
|
||||
azure_feed="https://dotnetcli.azureedge.net/dotnet"
|
||||
uncached_feed="https://dotnetcli.blob.core.windows.net/dotnet"
|
||||
azure_feed=""
|
||||
uncached_feed=""
|
||||
feed_credential=""
|
||||
verbose=false
|
||||
runtime=""
|
||||
@ -1434,7 +1548,7 @@ do
|
||||
echo " - 3-part version in a format A.B.Cxx - represents a specific SDK release"
|
||||
echo " examples: 5.0.1xx, 5.0.2xx."
|
||||
echo " Supported since 5.0 release"
|
||||
echo " Note: The version parameter overrides the channel parameter when any version other than `latest` is used."
|
||||
echo " Note: The version parameter overrides the channel parameter when any version other than 'latest' is used."
|
||||
echo " -v,--version <VERSION> Use specific VERSION, Defaults to \`$version\`."
|
||||
echo " -Version"
|
||||
echo " Possible values:"
|
||||
@ -1447,7 +1561,7 @@ do
|
||||
echo " Works only in combination with channel. Not applicable for current and LTS channels and will be ignored if those channels are used."
|
||||
echo " For SDK use channel in A.B.Cxx format. Using quality for SDK together with channel in A.B format is not supported."
|
||||
echo " Supported since 5.0 release."
|
||||
echo " Note: The version parameter overrides the channel parameter when any version other than `latest` is used, and therefore overrides the quality."
|
||||
echo " Note: The version parameter overrides the channel parameter when any version other than 'latest' is used, and therefore overrides the quality."
|
||||
echo " --internal,-Internal Download internal builds. Requires providing credentials via --feed-credential parameter."
|
||||
echo " --feed-credential <FEEDCREDENTIAL> Token to access Azure feed. Used as a query string to append to the Azure feed."
|
||||
echo " -FeedCredential This parameter typically is not specified."
|
||||
@ -1469,8 +1583,12 @@ do
|
||||
echo " --dry-run,-DryRun Do not perform installation. Display download link."
|
||||
echo " --no-path, -NoPath Do not set PATH for the current process."
|
||||
echo " --verbose,-Verbose Display diagnostics information."
|
||||
echo " --azure-feed,-AzureFeed Azure feed location. Defaults to $azure_feed, This parameter typically is not changed by the user."
|
||||
echo " --uncached-feed,-UncachedFeed Uncached feed location. This parameter typically is not changed by the user."
|
||||
echo " --azure-feed,-AzureFeed For internal use only."
|
||||
echo " Allows using a different storage to download SDK archives from."
|
||||
echo " This parameter is only used if --no-cdn is false."
|
||||
echo " --uncached-feed,-UncachedFeed For internal use only."
|
||||
echo " Allows using a different storage to download SDK archives from."
|
||||
echo " This parameter is only used if --no-cdn is true."
|
||||
echo " --skip-non-versioned-files Skips non-versioned files if they already exist, such as the dotnet executable."
|
||||
echo " -SkipNonVersionedFiles"
|
||||
echo " --no-cdn,-NoCdn Disable downloading from the Azure CDN, and use the uncached feed directly."
|
||||
@ -1478,14 +1596,6 @@ do
|
||||
echo " Note: global.json must have a value for 'SDK:Version'"
|
||||
echo " -?,--?,-h,--help,-Help Shows this help message"
|
||||
echo ""
|
||||
echo "Obsolete parameters:"
|
||||
echo " --shared-runtime The recommended alternative is '--runtime dotnet'."
|
||||
echo " This parameter is obsolete and may be removed in a future version of this script."
|
||||
echo " Installs just the shared runtime bits, not the entire SDK."
|
||||
echo " --runtime-id Installs the .NET Tools for the given platform (use linux-x64 for portable linux)."
|
||||
echo " -RuntimeId" The parameter is obsolete and may be removed in a future version of this script. Should be used only for versions below 2.1.
|
||||
echo " For primary links to override OS or/and architecture, use --os and --architecture option instead."
|
||||
echo ""
|
||||
echo "Install Location:"
|
||||
echo " Location is chosen in following order:"
|
||||
echo " - --install-dir option"
|
||||
@ -1502,10 +1612,6 @@ do
|
||||
shift
|
||||
done
|
||||
|
||||
if [ "$no_cdn" = true ]; then
|
||||
azure_feed="$uncached_feed"
|
||||
fi
|
||||
|
||||
say "Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:"
|
||||
say "- The SDK needs to be installed without user interaction and without admin rights."
|
||||
say "- The SDK installation doesn't need to persist across multiple CI runs."
|
||||
@ -1523,33 +1629,11 @@ fi
|
||||
|
||||
check_min_reqs
|
||||
calculate_vars
|
||||
script_name=$(basename "$0")
|
||||
# generate_regular_links call below will 'exit' if the determined version is already installed.
|
||||
generate_download_links
|
||||
|
||||
if [ "$dry_run" = true ]; then
|
||||
say "Payload URLs:"
|
||||
say "Primary named payload URL: ${download_link}"
|
||||
if [ "$valid_legacy_download_link" = true ]; then
|
||||
say "Legacy named payload URL: ${legacy_download_link}"
|
||||
fi
|
||||
repeatable_command="./$script_name --version "\""$specific_version"\"" --install-dir "\""$install_root"\"" --architecture "\""$normalized_architecture"\"" --os "\""$normalized_os"\"""
|
||||
|
||||
if [ ! -z "$normalized_quality" ]; then
|
||||
repeatable_command+=" --quality "\""$normalized_quality"\"""
|
||||
fi
|
||||
|
||||
if [[ "$runtime" == "dotnet" ]]; then
|
||||
repeatable_command+=" --runtime "\""dotnet"\"""
|
||||
elif [[ "$runtime" == "aspnetcore" ]]; then
|
||||
repeatable_command+=" --runtime "\""aspnetcore"\"""
|
||||
fi
|
||||
|
||||
repeatable_command+="$non_dynamic_parameters"
|
||||
|
||||
if [ -n "$feed_credential" ]; then
|
||||
repeatable_command+=" --feed-credential "\""<feed_credential>"\"""
|
||||
fi
|
||||
|
||||
say "Repeatable invocation: $repeatable_command"
|
||||
if [[ "$dry_run" = true ]]; then
|
||||
print_dry_run
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
8825
package-lock.json
generated
8825
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
@ -30,7 +30,7 @@
|
||||
"author": "GitHub",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.2.6",
|
||||
"@actions/core": "^1.6.0",
|
||||
"@actions/exec": "^1.0.4",
|
||||
"@actions/github": "^1.1.0",
|
||||
"@actions/http-client": "^1.0.8",
|
||||
@ -40,15 +40,15 @@
|
||||
"xmlbuilder": "^13.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^25.2.3",
|
||||
"@types/node": "^12.12.62",
|
||||
"@types/jest": "^27.0.2",
|
||||
"@types/node": "^16.11.25",
|
||||
"@types/semver": "^6.2.2",
|
||||
"@zeit/ncc": "^0.21.1",
|
||||
"husky": "^4.3.0",
|
||||
"jest": "^26.4.2",
|
||||
"jest-circus": "^26.4.2",
|
||||
"@vercel/ncc": "^0.33.4",
|
||||
"husky": "^7.0.2",
|
||||
"jest": "^27.2.5",
|
||||
"jest-circus": "^27.2.5",
|
||||
"prettier": "^1.19.1",
|
||||
"ts-jest": "^26.4.0",
|
||||
"ts-jest": "^27.0.5",
|
||||
"typescript": "^3.9.7",
|
||||
"wget-improved": "^3.2.1"
|
||||
},
|
||||
|
@ -165,6 +165,12 @@ export class DotnetCoreInstaller {
|
||||
});
|
||||
}
|
||||
|
||||
if (resultCode != 0) {
|
||||
throw new Error(`Failed to install dotnet ${resultCode}. ${output}`);
|
||||
}
|
||||
}
|
||||
|
||||
static addToPath() {
|
||||
if (process.env['DOTNET_INSTALL_DIR']) {
|
||||
core.addPath(process.env['DOTNET_INSTALL_DIR']);
|
||||
core.exportVariable('DOTNET_ROOT', process.env['DOTNET_INSTALL_DIR']);
|
||||
@ -189,10 +195,6 @@ export class DotnetCoreInstaller {
|
||||
}
|
||||
|
||||
console.log(process.env['PATH']);
|
||||
|
||||
if (resultCode != 0) {
|
||||
throw new Error(`Failed to install dotnet ${resultCode}. ${output}`);
|
||||
}
|
||||
}
|
||||
|
||||
// versionInfo - versionInfo of the SDK/Runtime
|
||||
@ -283,7 +285,14 @@ export class DotnetCoreInstaller {
|
||||
);
|
||||
}
|
||||
|
||||
return releasesInfo[0]['releases.json'];
|
||||
const releaseInfo = releasesInfo[0];
|
||||
if (releaseInfo['support-phase'] === 'eol') {
|
||||
core.warning(
|
||||
`${releaseInfo['product']} ${releaseInfo['channel-version']} is no longer supported and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the .NET support policy.`
|
||||
);
|
||||
}
|
||||
|
||||
return releaseInfo['releases.json'];
|
||||
}
|
||||
|
||||
private version: string;
|
||||
|
@ -9,31 +9,48 @@ export async function run() {
|
||||
//
|
||||
// dotnet-version is optional, but needs to be provided for most use cases.
|
||||
// If supplied, install / use from the tool cache.
|
||||
// global-version-file may be specified to point to a specific global.json
|
||||
// and will be used to install an additional version.
|
||||
// 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('dotnet-version');
|
||||
if (!version) {
|
||||
let versions = core.getMultilineInput('dotnet-version');
|
||||
|
||||
const globalJsonFileInput = core.getInput('global-json-file');
|
||||
if (globalJsonFileInput) {
|
||||
const globalJsonPath = path.join(process.cwd(), globalJsonFileInput);
|
||||
if (!fs.existsSync(globalJsonPath)) {
|
||||
throw new Error(
|
||||
`The specified global.json file '${globalJsonFileInput}' does not exist`
|
||||
);
|
||||
}
|
||||
versions.push(getVersionFromGlobalJson(globalJsonPath));
|
||||
}
|
||||
|
||||
if (!versions.length) {
|
||||
// Try to fall back to global.json
|
||||
core.debug('No version found, trying to find version from global.json');
|
||||
const globalJsonPath = path.join(process.cwd(), 'global.json');
|
||||
if (fs.existsSync(globalJsonPath)) {
|
||||
version = getVersionFromGlobalJson(globalJsonPath);
|
||||
versions.push(getVersionFromGlobalJson(globalJsonPath));
|
||||
}
|
||||
}
|
||||
|
||||
if (version) {
|
||||
if (versions.length) {
|
||||
const includePrerelease: boolean =
|
||||
(core.getInput('include-prerelease') || 'false').toLowerCase() ===
|
||||
'true';
|
||||
|
||||
const dotnetInstaller = new installer.DotnetCoreInstaller(
|
||||
let dotnetInstaller!: installer.DotnetCoreInstaller;
|
||||
for (const version of new Set<string>(versions)) {
|
||||
dotnetInstaller = new installer.DotnetCoreInstaller(
|
||||
version,
|
||||
includePrerelease
|
||||
);
|
||||
await dotnetInstaller.installDotnet();
|
||||
}
|
||||
installer.DotnetCoreInstaller.addToPath();
|
||||
}
|
||||
|
||||
const sourceUrl: string = core.getInput('source-url');
|
||||
const configFile: string = core.getInput('config-file');
|
||||
|
Reference in New Issue
Block a user