Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Update Release Extension workflow to package Firefox source #1402

Open
jurevans opened this issue Dec 12, 2024 · 0 comments
Open

CI: Update Release Extension workflow to package Firefox source #1402

jurevans opened this issue Dec 12, 2024 · 0 comments
Assignees

Comments

@jurevans
Copy link
Collaborator

jurevans commented Dec 12, 2024

The current workflow for releasing the extension properly builds Chrome, but does not properly build Firefox in a way that can be submitted for review (as the Chrome version can):

  • The built extension asset for Firefox must be the .zip file generated inside apps/extension/build/firefox, and not a zip archive of the entire folder (e.g., decompressing this archive should not place files inside of a folder; this is a requirement for submission)
  • The source code should be packaged with only the dependencies needed to build the extension
  • The source code archive should have the following injected into the apps/extension/.env folder before zipping, replacing the hash with the current git revision in the build:
NAMADA_INTERFACE_REVISION=8916680a2bcd43f1ef54b47e2d0213d1d02abbfb

This is provided so that Firefox reviewers can build an exact copy of the Firefox add-on, which will contain this hash (Settings->Revision). The packaged source will not be a .git repo, therefore this is the simplest way for them to get an equivalent build.

See current example release: https://github.com/anoma/namada-interface/releases/tag/v0.3.6-8916680

The current workflow bundles source as:

  • Source code (zip)
  • Source code (tar.gz)

It would be better if this was simply the extension source + dependencies (remove .git, .github, apps/namadillo & apps/faucet mainly). I think this is important to do because we do not want them to waste time reviewing code that is irrelevant to the extension. Eventually this won't be an issue when the extension is moved to its own repo!

Caveat

It may be difficult to fully verify this change until we have a valid submission to Firefox, as there may be more changes to account for. At least we can now get started on packaging and adding the .env - that is a very good start!

Exact steps to submit to Firefox, before we have this in CI

NOTE Replace 0.3.x with correct version. This should basically be what is handled by CI in the future.

git clone https://github.com/anoma/namada-interface.git namada-keychain-firefox-0.3.x-source
cd namada-keychain-firefox-0.3.x-source

# Clean up unneeded sources & folders
rm -rf apps/namadillo
rm -rf apps/faucet
rm -rf .git* 
rm -rf e2e
rm -rf storybook
rm -rf audit

# The extension must have the git revision specified in a .env

# In the actual namada-interface repo, get the latest commit hash
cd /path/to/namada-interface
git checkout main
git pull
echo "NAMADA_INTERFACE_REVISION=$(git rev-parse HEAD)" > \ 
  /path/to/namada-keychain-firefox-0.3.x-source/apps/extension/.env

# Create zip archive

zip -r namada-keychain-firefox-0.3.x-source.zip namada-keychain-firefox-0.3.x-source

# Build namada-keychain-firefox-0.3.x-source.zip using Docker, once finished provide the zip, along with the source code zip

/path/to/namada-keychain-firefox-0.3.x-source/apps/extension/build/firefox/namada-keychain-0.3.x.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant