Skip to content

Set a flag for dev builds to fix manifest issue - #149

Merged
wojtekn merged 3 commits into
trunkfrom
update/generating-dev-release-manifest
May 23, 2024
Merged

Set a flag for dev builds to fix manifest issue#149
wojtekn merged 3 commits into
trunkfrom
update/generating-dev-release-manifest

Conversation

@wojtekn

@wojtekn wojtekn commented May 22, 2024

Copy link
Copy Markdown
Contributor

Related to https://github.com/Automattic/dotcom-forge/issues/7339

Proposed Changes

I propose to set an environment variable to state that the given build is a dev build. That way, the manifest can be generated correctly for dev builds after recent pipeline changes.

Testing Instructions

See if the manifest is generated correctly and if dev builds are updated.

Currently, 'Distribute Dev Builds' step runs only for trunk, so it can't be tested before the merge.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@wojtekn
wojtekn requested review from jkmassel and p-jackson May 22, 2024 06:27
@wojtekn wojtekn self-assigned this May 22, 2024
@wojtekn
wojtekn requested a review from mokagio May 22, 2024 06:34

@p-jackson p-jackson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

The step doesn't run on PR builds, so there's no better way to test other than to merge. YOLO.

Comment thread .buildkite/pipeline.yml Outdated
buildkite-agent artifact download "*.exe" .

echo "--- :node: Generating Release Manifest"
export IS_DEV_BUILD=true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or IS_DEV_BUILD=true node ./scripts/generate-releases-manifest.mjs to make it explicit the flag is specifically for the generate-releases-manifest script.

@wojtekn
wojtekn merged commit 1fe21c8 into trunk May 23, 2024
@wojtekn
wojtekn deleted the update/generating-dev-release-manifest branch May 23, 2024 07:59
@wojtekn

wojtekn commented May 23, 2024

Copy link
Copy Markdown
Contributor Author

It worked fine, as the 'dev' builds section in manifest was regenerated:

Version: 1.0.2
--
  | Is dev build: true
  | Current commit: 1fe21c8
  | Downloading current manifest ...
  | (node:1670) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
  |  
  | Download complete
  | Parsing current release info ...
  | Overriding latest dev release ...
  | Overwrote latest dev release
  | Done generating releases manifest.

And here is the section:

% curl https://cdn.a8c-ci.services/studio/releases.json
{
  "dev": {
    "darwin": {
      "universal": {
        "sha": "1fe21c8",
        "url": "https://cdn.a8c-ci.services/studio/studio-darwin-1fe21c8.app.zip"
      },
      "x64": {
        "sha": "1fe21c8",
        "url": "https://cdn.a8c-ci.services/studio/studio-darwin-x64-1fe21c8.app.zip"
      },
      "arm64": {
        "sha": "1fe21c8",
        "url": "https://cdn.a8c-ci.services/studio/studio-darwin-arm64-1fe21c8.app.zip"
      }
    },
    "win32": {
      "sha": "1fe21c8",
      "url": "https://cdn.a8c-ci.services/studio/studio-win32-1fe21c8.exe"
    }
  },
[...]

However, links don't work so we need to check it more.

@p-jackson

Copy link
Copy Markdown
Member

I notice the -universal- bit is missing from the universal build's filename. But I don't know what's wrong with the other ones. Should the filename include -v1.0.2-dev.1fe21c8?

@wojtekn

wojtekn commented May 23, 2024

Copy link
Copy Markdown
Contributor Author

@p-jackson I fixed those in #153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants