Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustav-Eikaas committed Nov 5, 2024
1 parent bc51a91 commit 43e5f3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
16 changes: 1 addition & 15 deletions github-action/src/utils/makeManifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@ import { notice } from '@actions/core';
export function makeManifest(path: string) {
// Create manifest
notice('making manifest');
const { version, name, ...maybe } = parsePackageJson(path);
const { version, name } = parsePackageJson(path);
if (!version || !name) {
throw new Error('Name or version missing in package.json');
}
const { major, minor, patch } = splitVersions(version);

/** Some app-manifests have custom short and displaynames */
const shortName = maybe?.['shortName'] ?? name;
const displayName = maybe?.['displayName'] ?? name[0].toUpperCase() + name.slice(1);

const manifest = {
//required
entryPoint: "app-bundle.js",
Expand All @@ -31,11 +25,3 @@ export function makeManifest(path: string) {
fs.writeFileSync('./dist/app-manifest.json', data);
}

function splitVersions(version: string) {
const [major, minor, patch] = version.split('.');
return {
major,
minor,
patch,
};
}
2 changes: 1 addition & 1 deletion github-action/src/utils/uploadBundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export async function uploadBundle(
);

notice(`bundle uploaded with status code ${r.message.statusCode}`);
if (r.message.statusCode !== 200) {
if (r.message.statusCode !== 201) {
const body = await r.readBody()
logInfo(`Failed to upload ${appKey}, code: ${r.message.statusCode}`, 'Red');
logInfo(body, 'Red');
Expand Down

0 comments on commit 43e5f3a

Please sign in to comment.