Skip to content

Commit

Permalink
feat: make it possible to ignore release time when publish to github (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmlby authored Sep 17, 2020
1 parent b087954 commit fca50ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/electron-publish/src/gitHubPublisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class GitHubPublisher extends HttpPublisher {
// https://github.com/electron-userland/electron-builder/issues/2074
// if release created < 2 hours — allow to upload
const publishedAt = release.published_at == null ? null : Date.parse(release.published_at)
if (publishedAt != null && (Date.now() - publishedAt) > (2 * 3600 * 1000)) {
if (!isEnvTrue(process.env.EP_GH_IGNORE_TIME) && publishedAt != null && (Date.now() - publishedAt) > (2 * 3600 * 1000)) {
// https://github.com/electron-userland/electron-builder/issues/1183#issuecomment-275867187
this.releaseLogFields = {
reason: "existing release published more than 2 hours ago",
Expand Down

0 comments on commit fca50ae

Please sign in to comment.