Skip to content

Commit

Permalink
chore: fix codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
PYudakov committed Jan 23, 2025
1 parent af02950 commit 1c90289
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions packages/publisher/electron-release-server/src/PublisherERS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,23 @@ export default class PublisherERS extends PublisherBase<PublisherERSConfig> {

// Find the version with the same name and flavor
const existingVersion: ERSVersion = await authFetch(`api/version?name=${packageJSON.version}&flavor=${flavor}`)
.then(res => res.json())
.then(versions => versions.find((version: ERSVersion) => {
return version.name === packageJSON.version && version.flavor.name === flavor
}))
.catch(() => undefined)

let channel = "stable"
.then((res) => res.json())
.then((versions) =>
versions.find((version: ERSVersion) => {
return version.name === packageJSON.version && version.flavor.name === flavor;
})
)
.catch(() => undefined);

let channel = 'stable';
if (config.channel) {
channel = config.channel
} else if (packageJSON.version.includes("rc")) {
channel = "rc"
} else if (packageJSON.version.includes("beta")) {
channel = "beta"
} else if (packageJSON.version.includes("alpha")) {
channel = "alpha"
channel = config.channel;
} else if (packageJSON.version.includes('rc')) {
channel = 'rc';
} else if (packageJSON.version.includes('beta')) {
channel = 'beta';
} else if (packageJSON.version.includes('alpha')) {
channel = 'alpha';
}

if (!existingVersion) {
Expand Down

0 comments on commit 1c90289

Please sign in to comment.