Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 9d1ff70

Browse files
authored
Merge branch 'feat/login' into fix/empty_parameters
2 parents be700cb + f8cf0a2 commit 9d1ff70

18 files changed

+241
-127
lines changed

.github/workflows/build-cli.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ jobs:
88
steps:
99
- name: Checkout
1010
uses: actions/checkout@v2
11+
with:
12+
submodules: true
1113
- name: Setup .NET Core SDK 6
1214
uses: actions/setup-dotnet@v1
1315
with:
1416
dotnet-version: 6.x
1517
- name: Add NuGet kiota source
16-
# TODO: Add NUGET_USER and NUGET_PASSWORD secrets
17-
# TODO: Add NUGET_URL to env
1818
# NOTE: Password encryption is not supported for the linux platform (Encryption is only supported on Windows platforms.)
1919
run: |
2020
dotnet nuget add source ${{env.NUGET_URL}} -n github -u ${{secrets.NUGET_USER}} -p ${{secrets.NUGET_PASSWORD}} --store-password-in-clear-text

.github/workflows/release-cli.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: "Release CLI"
2+
on: workflow_dispatch # Run manually. Incomplete workflow
3+
jobs:
4+
build-windows:
5+
runs-on: ubuntu-latest
6+
env:
7+
NUGET_URL: https://nuget.pkg.github.com/microsoft/index.json
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v2
11+
- name: Setup .NET Core SDK 6
12+
uses: actions/setup-dotnet@v1
13+
with:
14+
dotnet-version: 6.x
15+
- name: Add NuGet kiota source
16+
# NOTE: Password encryption is not supported for the linux platform (Encryption is only supported on Windows platforms.)
17+
run: |
18+
dotnet nuget add source ${{env.NUGET_URL}} -n github -u ${{secrets.NUGET_USER}} -p ${{secrets.NUGET_PASSWORD}} --store-password-in-clear-text
19+
- uses: actions/cache@v2
20+
with:
21+
path: ~/.nuget/packages
22+
# Look to see if there is a cache hit for the corresponding requirements file
23+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
24+
restore-keys: |
25+
${{ runner.os }}-nuget
26+
- name: Install dependencies
27+
run: dotnet restore
28+
- name: Build
29+
run: dotnet publish --runtime win-x64 --self-contained true --configuration Release --no-restore
30+
build-mac:
31+
runs-on: ubuntu-latest
32+
env:
33+
NUGET_URL: https://nuget.pkg.github.com/microsoft/index.json
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v2
37+
- name: Setup .NET Core SDK 6
38+
uses: actions/setup-dotnet@v1
39+
with:
40+
dotnet-version: 6.x
41+
- name: Add NuGet kiota source
42+
# NOTE: Password encryption is not supported for the linux platform (Encryption is only supported on Windows platforms.)
43+
run: |
44+
dotnet nuget add source ${{env.NUGET_URL}} -n github -u ${{secrets.NUGET_USER}} -p ${{secrets.NUGET_PASSWORD}} --store-password-in-clear-text
45+
- uses: actions/cache@v2
46+
with:
47+
path: ~/.nuget/packages
48+
# Look to see if there is a cache hit for the corresponding requirements file
49+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
50+
restore-keys: |
51+
${{ runner.os }}-nuget
52+
- name: Install dependencies
53+
run: dotnet restore
54+
- name: Build
55+
run: dotnet publish --runtime osx-x64 --self-contained true --configuration Release --no-restore

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,3 +571,6 @@ FodyWeavers.xsd
571571
# Additional files built by Visual Studio
572572

573573
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,visualstudio,intellij+all,dotnetcore,windows,macos,linux
574+
575+
app-settings.*.json
576+
!app-settings.sample.json

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "msgraph-cli-core"]
2+
path = msgraph-cli-core
3+
url = https://github.com/microsoftgraph/msgraph-cli-core.git
4+
branch = chore/refactor

.vscode/launch.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
"type": "coreclr",
1010
"request": "launch",
1111
"preLaunchTask": "build",
12-
"program": "${workspaceFolder}/src/bin/Debug/net6.0/msgraph-cli.dll",
12+
"program": "${workspaceFolder}/src/bin/Debug/net6.0/mgc.dll",
1313
"args": ["-h"],
1414
"cwd": "${workspaceFolder}/src",
15+
"envFile": "${workspaceFolder}/src/.env",
1516
"console": "internalConsole",
1617
"stopAtEntry": false
1718
},
@@ -20,9 +21,10 @@
2021
"type": "coreclr",
2122
"request": "launch",
2223
"preLaunchTask": "build",
23-
"program": "${workspaceFolder}/src/bin/Debug/net6.0/msgraph-cli.dll",
24+
"program": "${workspaceFolder}/src/bin/Debug/net6.0/mgc.dll",
2425
"args": ["login", "--scopes", "User.ReadWrite Mail.ReadWrite"],
2526
"cwd": "${workspaceFolder}/src",
27+
"envFile": "${workspaceFolder}/src/.env",
2628
"console": "internalConsole",
2729
"stopAtEntry": false
2830
},
@@ -31,9 +33,10 @@
3133
"type": "coreclr",
3234
"request": "launch",
3335
"preLaunchTask": "build",
34-
"program": "${workspaceFolder}/src/bin/Debug/net6.0/msgraph-cli.dll",
35-
"args": ["me", "get", "--select", "id", "--select", "displayName"],
36+
"program": "${workspaceFolder}/src/bin/Debug/net6.0/mgc.dll",
37+
"args": ["me", "get"],
3638
"cwd": "${workspaceFolder}/src",
39+
"envFile": "${workspaceFolder}/src/.env",
3740
"console": "internalConsole",
3841
"stopAtEntry": false
3942
},

msgraph-cli-core

Submodule msgraph-cli-core added at 8431f53

src/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DOTNET_ENVIRONMENT=Development

src/Authentication/AuthenticationServiceFactory.cs

Lines changed: 0 additions & 61 deletions
This file was deleted.

src/Authentication/DeviceCodeAuthenticationService.cs

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/Authentication/IAuthenticationService.cs

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)