Skip to content

Commit c46e418

Browse files
fix: change sppkg details for mgt-spfx
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 <[email protected]>
1 parent 141ae19 commit c46e418

File tree

2 files changed

+25
-24
lines changed

2 files changed

+25
-24
lines changed
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
2-
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
3-
"solution": {
4-
"name": "mgt-spfx-client-side-solution",
5-
"id": "e342d2ab-fc3f-45f6-93a5-268fd8632211",
6-
"version": "2.0.2.0",
7-
"includeClientSideAssets": true,
8-
"skipFeatureDeployment": true,
9-
"isDomainIsolated": false,
10-
"developer": {
11-
"name": "Microsoft Graph Toolkit",
12-
"websiteUrl": "https://docs.microsoft.com/graph/toolkit/overview",
13-
"privacyUrl": "https://privacy.microsoft.com/privacystatement",
14-
"termsOfUseUrl": "https://privacy.microsoft.com/privacystatement",
15-
"mpnId": "000000"
16-
}
17-
},
18-
"paths": {
19-
"zippedPackage": "solution/mgt-spfx.sppkg"
20-
}
21-
}
2+
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
3+
"solution": {
4+
"name": "Microsoft Graph Toolkit v2 for SPFx",
5+
"id": "e342d2ab-fc3f-45f6-93a5-268fd8632211",
6+
"version": "2.0.2.0",
7+
"includeClientSideAssets": true,
8+
"skipFeatureDeployment": true,
9+
"isDomainIsolated": false,
10+
"developer": {
11+
"name": "Microsoft Graph Toolkit",
12+
"websiteUrl": "https://docs.microsoft.com/graph/toolkit/overview",
13+
"privacyUrl": "https://privacy.microsoft.com/privacystatement",
14+
"termsOfUseUrl": "https://privacy.microsoft.com/privacystatement",
15+
"mpnId": "000000"
16+
}
17+
},
18+
"paths": {
19+
"zippedPackage": "solution/mgt-spfx.sppkg"
20+
}
21+
}

scripts/uploadSpfxSolution.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ const octokit = new Octokit({ auth });
4444
}
4545

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

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

61-
console.log(`attaching ${assetPath} as ${name} to release`)
62+
console.log(`attaching ${assetPath} as ${filename} to release`)
6263
await octokit.rest.repos.uploadReleaseAsset({
6364
owner,
6465
repo,
6566
release_id: release.id,
6667
data: file,
67-
name: `mgt-spfx-${version}.sppkg`
68+
name: filename
6869
});
6970

7071
console.log('done')
71-
})();
72+
})();

0 commit comments

Comments
 (0)