mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-25 03:20:23 +01:00
50767dd193
* Ensure that firefox linting of beta builds only happens on beta build commits * Fix script
28 lines
721 B
Bash
28 lines
721 B
Bash
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
set -u
|
|
set -o pipefail
|
|
|
|
current_commit_msg=$(git show -s --format='%s' HEAD)
|
|
|
|
if [[ $current_commit_msg =~ Version[[:space:]](v[[:digit:]]+.[[:digit:]]+.[[:digit:]]+[-]beta.[[:digit:]]) ]]
|
|
then
|
|
# filter the commit message like Version v10.24.1-beta.1
|
|
printf '%s\n' "Linting beta builds for firefox"
|
|
# Move beta build to dist
|
|
mv ./dist-beta ./dist
|
|
# Move beta zips to builds
|
|
mv ./builds-beta ./builds
|
|
# test:mozilla-lint
|
|
export NODE_OPTIONS='--max_old_space_size=3072'
|
|
yarn mozilla-lint
|
|
else
|
|
printf '%s\n' 'Commit message does not match commit message for beta pattern; skipping linting for firefox'
|
|
mkdir dist
|
|
mkdir builds
|
|
exit 0
|
|
fi
|
|
|
|
exit 0
|