-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed the build for the firefox browser (#3733)
In new versions the extension was simply not built for this browser. Changed the build scripts and made them cross-managers. Now it can be compiled not only by docker. In general, everything works, except probably the main thing - sign in at dapps. If it ever gets fixed it will be great Latest build: [extension-builds-3733](https://github.com/tahowallet/extension/suites/20259618358/artifacts/1209187521) (as of Wed, 31 Jan 2024 15:25:58 GMT).
- Loading branch information
Showing
4 changed files
with
57 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -334,17 +334,35 @@ ui/ # @tallyho/tally-ui package | |
|
||
Firefox requires to upload source code if minifier is used and to be able to compile identical output to the uploaded package. Our builds are environment dependent at the moment because of the minification and source map process. Long term solution will be to upgrade our build process to be able to produce identical file assets, but until then we use Docker. | ||
|
||
- install and setup docker: https://docs.docker.com/get-docker/ | ||
- git clone [email protected]:tallycash/extension.git tallyho-firefox | ||
- cd tallyho-firefox | ||
- git checkout tags/latest_release-tag | ||
- .env.prod: fill in the prod API keys | ||
- `./firefox-build.sh` | ||
- mv firefox.zip ../ | ||
- git clean -fdx | ||
- rm -rf .git | ||
- cd .. | ||
- zip -r tallyho-firefox.zip tallyho-firefox | ||
1. Install and setup container manger, like at [nerdctl](https://github.com/containerd/nerdctl),[podman](https://podman.io/) or [docker](https://www.docker.com/) | ||
2. Clone git repository | ||
|
||
```sh | ||
git clone https://github.com:tallycash/extension.git tallyho-firefox | ||
``` | ||
|
||
3. Change the directory | ||
|
||
```sh | ||
cd tallyho-firefox | ||
git checkout tags/latest_release-tag | ||
``` | ||
|
||
4. Fill the production keys `.env.prod` file | ||
|
||
5. Run build script | ||
|
||
```sh | ||
./firefox-build.sh | ||
``` | ||
|
||
6. Archive it | ||
|
||
```sh | ||
zip -r tallyho-firefox.zip dist/firefox | ||
``` | ||
|
||
7. You can delete everything if you want except for the archive | ||
|
||
## Localization | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,24 @@ | ||
#!/bin/bash | ||
#!/bin/env sh | ||
|
||
if command -v nerdctl &> /dev/null; then | ||
ctrmanager=nerdctl | ||
elif command -v docker &> /dev/null; then | ||
ctrmanager=docker | ||
elif command -v podman &> /dev/null; then | ||
ctrmanager=podman | ||
else | ||
echo "Installing a container manager" >&2 | ||
exit | ||
fi | ||
|
||
echo "--- Let's clean up from earlier ---" | ||
rm firefox.zip | ||
docker container rm -f tally-ho-container || true | ||
docker image rm --force tally-ho-image:latest || true | ||
rm -rf dist | ||
$ctrmanager image rm --force tally-ho-image:latest || true | ||
|
||
echo "--- Build extension ---" | ||
docker build --no-cache -t tally-ho-image:latest . | ||
docker create --name tally-ho-container tally-ho-image | ||
|
||
echo "--- Copy build output to host ---" | ||
docker cp tally-ho-container:/tally-ho/dist/firefox.zip ./firefox.zip | ||
$ctrmanager build -t tally-ho-image:latest --output=dist --target=dist . | ||
|
||
echo "--- Let's clean up ---" | ||
docker container rm -f tally-ho-container || true | ||
docker image rm --force tally-ho-image:latest || true | ||
|
||
$ctrmanager image rm --force tally-ho-image:latest || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters