Skip to content

Commit

Permalink
updated to .net 6 (#4936)
Browse files Browse the repository at this point in the history
  • Loading branch information
majastrz committed Nov 18, 2021
1 parent c4fb1f8 commit b5fe23c
Show file tree
Hide file tree
Showing 50 changed files with 1,796 additions and 12,705 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ jobs:
run: dotnet publish --configuration ${{ matrix.configuration }} ./src/Bicep.LangServer/Bicep.LangServer.csproj

- name: Publish Bicep
run: dotnet publish --configuration ${{ matrix.configuration }} --self-contained true -p:PublishTrimmed=true -p:PublishSingleFile=true -r ${{ matrix.rid }} ./src/Bicep.Cli/Bicep.Cli.csproj
run: dotnet publish --configuration ${{ matrix.configuration }} --self-contained true -p:PublishTrimmed=true -p:PublishSingleFile=true -p:TrimmerDefaultAction=copyused -p:SuppressTrimAnalysisWarnings=true -r ${{ matrix.rid }} ./src/Bicep.Cli/Bicep.Cli.csproj

- name: Run Bicep E2E Tests
if: ${{ matrix.rid != 'linux-musl-x64' }}
run: npm ci && npm test
env:
BICEP_CLI_EXECUTABLE: ../../../Bicep.Cli/bin/${{ matrix.configuration }}/net5.0/${{ matrix.rid }}/publish/bicep
BICEP_CLI_EXECUTABLE: ../../../Bicep.Cli/bin/${{ matrix.configuration }}/net6.0/${{ matrix.rid }}/publish/bicep
working-directory: ./src/Bicep.Cli.E2eTests

- name: Run Bicep E2E Tests (linux-musl-x64)
Expand All @@ -96,21 +96,21 @@ jobs:
entrypoint: sh
args: -c "apk add --update nodejs npm && npm ci --prefix ./src/Bicep.Cli.E2eTests && npm test --prefix ./src/Bicep.Cli.E2eTests"
env:
BICEP_CLI_EXECUTABLE: ../../../Bicep.Cli/bin/${{ matrix.configuration }}/net5.0/${{ matrix.rid }}/publish/bicep
BICEP_CLI_EXECUTABLE: ../../../Bicep.Cli/bin/${{ matrix.configuration }}/net6.0/${{ matrix.rid }}/publish/bicep

- name: Upload Language Server
uses: actions/upload-artifact@v2
if: ${{ matrix.publishLanguageServer == 'true' }}
with:
name: Bicep.LangServer
path: ./src/Bicep.LangServer/bin/${{ matrix.configuration }}/net5.0/publish/*
path: ./src/Bicep.LangServer/bin/${{ matrix.configuration }}/net6.0/publish/*
if-no-files-found: error

- name: Upload Bicep
uses: actions/upload-artifact@v2
with:
name: bicep-${{ matrix.configuration }}-${{ matrix.rid }}
path: ./src/Bicep.Cli/bin/${{ matrix.configuration }}/net5.0/${{ matrix.rid }}/publish/*
path: ./src/Bicep.Cli/bin/${{ matrix.configuration }}/net6.0/${{ matrix.rid }}/publish/*
if-no-files-found: error

- name: Upload Packages
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/Bicep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ steps:
command: 'publish'
publishWebProjects: false
projects: ./src/Bicep.Cli/Bicep.Cli.csproj
arguments: '--configuration $(BuildConfiguration) --self-contained true -p:PublishTrimmed=true -p:PublishSingleFile=true -r ${{ parameters.rid }} /p:PublicRelease=${{ parameters.official }}'
arguments: '--configuration $(BuildConfiguration) --self-contained true -p:PublishTrimmed=true -p:PublishSingleFile=true -p:TrimmerDefaultAction=copyused -p:SuppressTrimAnalysisWarnings=true -r ${{ parameters.rid }} /p:PublicRelease=${{ parameters.official }}'
zipAfterPublish: false

- ${{ if eq(parameters.rid, 'win-x64') }}:
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/OneBranch.Buddy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ variables:

BuildSolution: $(Build.SourcesDirectory)/Bicep.sln
BuildConfiguration: Release
TargetFramework: net5.0
TargetFramework: net6.0

# Docker images which are used to build the project https://aka.ms/obpipelines/containers
WindowsContainerImage: 'cdpxwin1809.azurecr.io/global/vse2019:latest'
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/OneBranch.Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ variables:

BuildSolution: $(Build.SourcesDirectory)/Bicep.sln
BuildConfiguration: Release
TargetFramework: net5.0
TargetFramework: net6.0

# Docker images which are used to build the project https://aka.ms/obpipelines/containers
WindowsContainerImage: 'cdpxwin1809.azurecr.io/global/vse2019:latest'
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "Build CLI",
"program": "${workspaceFolder}/src/Bicep.Cli/bin/Debug/net5.0/Bicep.dll",
"program": "${workspaceFolder}/src/Bicep.Cli/bin/Debug/net6.0/Bicep.dll",
"args": [
"build",
"${file}"
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ If you have an active branch pushed to your GitHub fork, you can use the "Update
* On the first run, you'll need to ensure you have installed all the npm packages required by the Bicep VSCode extension with the following:
* `cd src/vscode-bicep`
* `npm i`
* In the [VSCode Run View](https://code.visualstudio.com/Docs/editor/debugging), select the "Bicep VSCode Extension" task, and press the "Start" button. This will launch a new VSCode window with the Bicep extension and LanguageServer containing your changes. When running on WSL, create a symbolic link in `src/vscode-bicep` named `bicepLanguageServer` to `../Bicep.LangServer/bin/Debug/net5.0`.
* In the [VSCode Run View](https://code.visualstudio.com/Docs/editor/debugging), select the "Bicep VSCode Extension" task, and press the "Start" button. This will launch a new VSCode window with the Bicep extension and LanguageServer containing your changes. When running on WSL, create a symbolic link in `src/vscode-bicep` named `bicepLanguageServer` to `../Bicep.LangServer/bin/Debug/net6.0`.
* If you want the ability to put breakpoints and step through the C# code, you can also use the "Attach" run configuration once the extension host has launched, and select the Bicep LanguageServer process by searching for "bicep".

### Running the Bicep CLI
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
},
"sdk": {
"allowPrerelease": false,
"version": "5.0.200",
"version": "6.0.100",
"rollForward": "latestFeature"
}
}
4 changes: 2 additions & 2 deletions scripts/bcode.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# any agruments passed to this script is given to the VSCode executable, therefore you can run
# ./bcode.ps1 docs/Examples to open VSCode in the Examples folder running your local bicep lang server and in vscode terminal you have access to your local bicep CLI build

$ENV:BICEP_LANGUAGE_SERVER_PATH=[System.IO.Path]::Join($PSScriptRoot,"..\src\Bicep.LangServer\bin\Debug\net5.0\Bicep.LangServer.dll")
$ENV:Path=[System.IO.Path]::Join($PSScriptRoot,"..\src\Bicep.Cli\bin\Debug\net5.0") + ";" + $ENV:Path
$ENV:BICEP_LANGUAGE_SERVER_PATH=[System.IO.Path]::Join($PSScriptRoot,"..\src\Bicep.LangServer\bin\Debug\net6.0\Bicep.LangServer.dll")
$ENV:Path=[System.IO.Path]::Join($PSScriptRoot,"..\src\Bicep.Cli\bin\Debug\net6.0") + ";" + $ENV:Path
& Start-Process -FilePath "code" -WindowStyle hidden -ArgumentList $args
Loading

0 comments on commit b5fe23c

Please sign in to comment.