Skip to content

Commit

Permalink
fix: change sppkg details for mgt-spfx
Browse files Browse the repository at this point in the history
Updates the sppkg file name to use the pattern mgt-spfx-v{majorVersion}.sppkg
Updates the solution name to "Microsoft Graph Toolkit v2 for SPFx"
Co-authored-by: Gavin Barron <gavinbarron@microsoft.com>
  • Loading branch information
HiltonGiesenow committed Jul 20, 2022
1 parent 141ae19 commit c46e418
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 24 deletions.
40 changes: 20 additions & 20 deletions packages/mgt-spfx/config/package-solution.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
"solution": {
"name": "mgt-spfx-client-side-solution",
"id": "e342d2ab-fc3f-45f6-93a5-268fd8632211",
"version": "2.0.2.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"isDomainIsolated": false,
"developer": {
"name": "Microsoft Graph Toolkit",
"websiteUrl": "https://docs.microsoft.com/graph/toolkit/overview",
"privacyUrl": "https://privacy.microsoft.com/privacystatement",
"termsOfUseUrl": "https://privacy.microsoft.com/privacystatement",
"mpnId": "000000"
}
},
"paths": {
"zippedPackage": "solution/mgt-spfx.sppkg"
}
}
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
"solution": {
"name": "Microsoft Graph Toolkit v2 for SPFx",
"id": "e342d2ab-fc3f-45f6-93a5-268fd8632211",
"version": "2.0.2.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"isDomainIsolated": false,
"developer": {
"name": "Microsoft Graph Toolkit",
"websiteUrl": "https://docs.microsoft.com/graph/toolkit/overview",
"privacyUrl": "https://privacy.microsoft.com/privacystatement",
"termsOfUseUrl": "https://privacy.microsoft.com/privacystatement",
"mpnId": "000000"
}
},
"paths": {
"zippedPackage": "solution/mgt-spfx.sppkg"
}
}
9 changes: 5 additions & 4 deletions scripts/uploadSpfxSolution.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ const octokit = new Octokit({ auth });
}

const file = fs.readFileSync(assetPath);
const name = `mgt-spfx-${version}.sppkg`;
const majorVersion = version.substring(0, version.indexOf("."));
const filename = `mgt-spfx-v${majorVersion}.sppkg`;

if (release.assets && release.assets.length) {
const asset = release.assets.filter(a => a.name === name)[0];
Expand All @@ -58,14 +59,14 @@ const octokit = new Octokit({ auth });
}
}

console.log(`attaching ${assetPath} as ${name} to release`)
console.log(`attaching ${assetPath} as ${filename} to release`)
await octokit.rest.repos.uploadReleaseAsset({
owner,
repo,
release_id: release.id,
data: file,
name: `mgt-spfx-${version}.sppkg`
name: filename
});

console.log('done')
})();
})();

0 comments on commit c46e418

Please sign in to comment.