Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.

* @microsoft/powerapps-isv-tools-contrib @microsoft/powerplatform-isv-tools-admin
/.github/CODEOWNERS @microsoft/powerplatform-isv-tools-admin
2 changes: 0 additions & 2 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ jobs:
npm ci
npm run set-version
npm run dist
env:
AZ_DevOps_Read_PAT: ${{ secrets.AZ_DevOps_Read_PAT }}

- name: Publish
run: |
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/PullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,3 @@ jobs:
npm i -g npm@8.19.4
npm ci
npm run ci
env:
AZ_DevOps_Read_PAT: ${{ secrets.AZ_DevOps_Read_PAT }}
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Project
# Power Platform CLI Wrapper

This repo acts as the intermediate layer between different hosts (Power Platform Build Tools, GitHub Actions) and PAC CLI.
This repo contains the intermediate layer between [Power Platform Build Tools](https://github.com/microsoft/powerplatform-build-tools), [GitHub Actions](https://github.com/microsoft/powerplatform-actions) and [PAC CLI](https://aka.ms/PowerPlatformCLI).

Cli-Wrapper by itself doesn't call a specific version of PAC CLI, it lets the individual hosts decide which version of PAC CLI to be used.
Although, it is recommended that all hosts use the latest version of PAC CLI.
Expand Down Expand Up @@ -33,7 +33,7 @@ Any use of third-party trademarks or logos are subject to those third-party's po

Windows, macOS or Linux:

- [Node.js LTS (currently v12)](https://nodejs.org/en/download/)
- [Node.js (LTS)](https://nodejs.org/en/download/)
- gulp CLI: ```npm install -g gulp-cli```
- [git](https://git-scm.com/downloads)
- [VS Code](https://code.visualstudio.com/Download) or your different favorite editor
Expand All @@ -43,12 +43,6 @@ Windows, macOS or Linux:
- [GitLens (eamodio.gitlens)](https://github.com/eamodio/vscode-gitlens)
- [markdownlint (davidanson.vscode-markdownlint)](https://github.com/DavidAnson/vscode-markdownlint)
- [Mocha sidebar (maty.vscode-mocha-sidebar)](https://github.com/maty21/mocha-sidebar)
- TEMPORARY:
- Create a PAT for the Azure DevOps org ```msazure``` with scope: package(read) and add it as local environment variable.
```Powershell
[Environment]::SetEnvironmentVariable('AZ_DevOps_Read_PAT', '<yourPAT>', [EnvironmentVariableTarget]::User)
```
- Create a PAT in GitHub to read packages, and enable SSO for the microsoft organization. Then run 'npm login --scope=@microsoft --registry=https://npm.pkg.github.com' and provide the PAT as password. This will only be needed until this repo is made public.

If developing on Linux or macOS, you will also need to install `git-lfs`. (It is prepackaged with the Git installer for Windows.) Follow the [instructions here](https://docs.github.com/en/github/managing-large-files/installing-git-large-file-storage) for your environment.

Expand All @@ -60,6 +54,7 @@ Clone, restore modules, build and run:
git clone https://github.com/microsoft/powerplatform-cli-wrapper.git
cd powerplatform-cli-wrapper
npm install
npm install -g gulp-cli
gulp ci
```

Expand Down
9 changes: 0 additions & 9 deletions gulp/lib/nugetInstall.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export default async function nugetInstall(feed, pkg) {
const packageName = pkg.name.toLowerCase();
const version = pkg.version.toLowerCase();
const packagePath = `${packageName}/${version}/${packageName}.${version}.nupkg`;
const feedPAT = argv.feedPAT || process.env['AZ_DevOps_Read_PAT'];

const nupkgUrl = new URL(packagePath, feed.url);
const reqInit = {
Expand All @@ -22,14 +21,6 @@ export default async function nugetInstall(feed, pkg) {
},
redirect: "manual",
};
if (feed.authenticated) {
if (!feedPAT) {
throw new Error(`nuget feed ${feed.name} requires authN but neither '--feedPAT' argument nor env var '${feed.patEnvironmentVariable}' was defined!`);
}
reqInit.headers['Authorization'] = `Basic ${Buffer.from(
'PAT:' + feedPAT
).toString('base64')}`;
}

info(`Downloading package: ${nupkgUrl}...`);
let res = await fetch(nupkgUrl, reqInit);
Expand Down
1 change: 0 additions & 1 deletion gulp/restore.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const nugetFeeds = require("../nuget.json").feeds;


// https://docs.microsoft.com/en-us/nuget/api/package-base-address-resource
// https://dev.azure.com/msazure/One/_packaging?_a=feed&feed=CAP_ISVExp_Tools_Daily

export default gulp.series(
...nugetFeeds
Expand Down
20 changes: 2 additions & 18 deletions nuget.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,16 @@
"packages": [
{
"name": "Microsoft.PowerApps.CLI",
"version": "1.32.8",
"version": "1.33.5",
"internalName": "pac"
},
{
"name": "Microsoft.PowerApps.CLI.Core.linux-x64",
"version": "1.32.8",
"version": "1.33.5",
"internalName": "pac_linux",
"chmod": "tools/pac"
}
]
},
{
"name": "CAP_ISVExp_Tools_Stable",
"url": "https://pkgs.dev.azure.com/msazure/_packaging/b0441cf8-0bc8-4fad-b126-841a6184e784/nuget/v3/flat2/",
"authenticated": true,
"patEnvironmentVariable": "AZ_DevOps_Read_PAT",
"packages": [
]
},
{
"name": "CAP_ISVExp_Tools_Daily",
"url": "https://pkgs.dev.azure.com/msazure/_packaging/d3fb5788-d047-47f9-9aba-76890f5cecf0/nuget/v3/flat2/",
"authenticated": true,
"patEnvironmentVariable": "AZ_DevOps_Read_PAT",
"packages": [
]
}
]
}