Something went wrong. Try again.
my website built using Rust (stdweb) → .wasm ricky.codes
Something went wrong. Try again.
123456789101112131415161718192021222324#!/usr/bin/env bashset -euo pipefail
loader_file="${1:-target/deploy/rickycodes.js}"version="${2:-}"
if [[ ! -f "${loader_file}" ]]; then echo "error: ${loader_file} not found." exit 1fi
if [[ -z "${version}" ]]; then echo "error: version argument is required." exit 1fi
# Ensure wasm fetch URL is cache-busted with the current build version.# Handles both first-time patch and replacing an existing ?v= value.sed -E -i \ "s#rickycodes\\.wasm(\\?v=[^\"']*)?#rickycodes.wasm?v=${version}#g" \ "${loader_file}"
echo "Versioned wasm loader in ${loader_file} with v=${version}"