Skip to content

Instantly share code, notes, and snippets.

@CyberHoward
Created June 20, 2023 16:39
Show Gist options
  • Save CyberHoward/9470462b236ab959104936b0b38db198 to your computer and use it in GitHub Desktop.
Save CyberHoward/9470462b236ab959104936b0b38db198 to your computer and use it in GitHub Desktop.
Arch agnostic optimize command
#!/usr/bin/env bash
if [[ $(arch) == "arm64" ]]; then
image="cosmwasm/workspace-optimizer-arm64"
else
image="cosmwasm/workspace-optimizer"
fi
# Optimized builds
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
${image}:0.12.13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment