Merge branch 'INDA-330-pii-update' into 'main'
[ProtonMail-WebClient.git] / applications / pass-extension / tools / release.sh
blob8cbef1bc52d55a2123c4bcc17166e352798d65ba
1 #!/usr/bin/env bash
3 remove_sourcemaps() {
4 local folder=$1
6 find "$folder" -type f -name '*.map' -exec rm -f {} +
7 find "$folder" -type f -name '*.js' -exec sed -e '/\/\/# sourceMappingURL=/d' -i.bak {} +
8 find "$folder" -type f -name '*.css' -exec sed -e '/\/\*# sourceMappingURL=/d' -i.bak {} +
9 find "$folder" -type f -name '*.bak' -delete
11 printf "🧹 Sourcemap files removed and references cleaned\n"
14 if [[ -n "${RELEASE:-}" ]]; then
15 remove_sourcemaps $1