-
Pre-requisites Docker must be installed. This is used to run a martin tile server image, which is the one that converts source files to sprites.
-
Make sure that the assets in
sprite_assetsare correct.
It is essential that the file names are correct.
For each folder (= OMS partner), there should be two folders –lightanddark. Then follow the same patterns as used in the app. Remember - all svgs should have a theme suffix ->lightordark. -
Generate sprites
bash generate_sprites.sh
After the run completes, the updated sprites should be available inside the
generated_spritesfolder.You can also pass one or more namespace names to only regenerate specific orgs:
bash generate_sprites.sh AtB FRAM
CI: When a pull request touches files under
sprite_assets/, GitHub Actions automatically regenerates sprites for the changed namespaces and commits the result back to the PR branch. No manual script run needed.
-
Upload sprites to GCS
Pre-requisites:
gcloudCLI installed and authenticated:gcloud auth application-default login- Your account needs
roles/storage.objectAdminon the target*--shared-assetsbuckets.
bash upload_sprites.sh staging # upload to all staging buckets bash upload_sprites.sh prod # upload to all prod buckets
Each run:
- Bumps the version automatically (reads last version from
uploads.md, increments) - Uploads all four tenants (AtB, Troms, NFK, FRAM) to the new
vNpath in their respective GCS buckets - Commits the new
uploads.mdrow and pushes an annotated git tagupload/<env>/v<N>
After uploading, open a PR in
firestore-configurationto point themapboxSpriteUrlsfor the relevant tenants at the new version path.