Files
firefox-accounts-mirror/_scripts/git-checkout-hook.sh
dschom 76ad8cb534 task(many): Fix issues with l10n:clone failing on postinstall
Because:
- We are hitting race conditions using postinstall
- If two packages invoke l10n:clone at the same time in their post install git will error out

This Commit:
- Adds a git checkout hook, so the l10n folder is regularly updated
- Remove l10n:clone and l10n:prime commands from the post install
- Moves the l10n:prime command into build and tests commands
- Adds clean script so blank slates can be tested locally
- Adds respective l10n-bundle and l10n-prime scripts per workspace
- Moves the creation of the git-head.txt to the prime step and avoids creating an change on the l10n repo

Co-authored-by: Peter deHaan <peter@deseloper.com>
2023-03-20 11:23:00 -05:00

21 lines
628 B
Bash
Executable File

#!/bin/bash
IFS=' '
read -ra G_PARAMS <<< "$HUSKY_GIT_PARAMS"
PREV=${G_PARAMS[0]}
NEXT=${G_PARAMS[1]}
if [ "$PREV" != "$NEXT" ]; then
if [[ "$FXA_AUTO_INSTALL" == 0 ]] || git diff --quiet "$PREV" "$NEXT" yarn.lock; then
exit 0
elif [[ "$FXA_AUTO_INSTALL" == 1 ]]; then
echo "yarn.lock changed, running 'yarn install'"
yarn install
else
echo -e "\nyarn.lock changed. You may want to run 'yarn install'.\n"
echo -e "To auto install next time set FXA_AUTO_INSTALL=1 or to 0 to disable this check.\n"
fi
fi
# Always grab the latest and greatest from l10n when switching branches
_scripts/l10n/clone.sh