diff --git a/scripts/track-flags.sh b/scripts/track-flags.sh index bce7daf4..332db449 100755 --- a/scripts/track-flags.sh +++ b/scripts/track-flags.sh @@ -1,7 +1,8 @@ LD_LOG_FILE=launchdarkly-flags.log echo "# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n" > $LD_LOG_FILE +GREP_FLAGS="-r -n -o -w --exclude-dir=coverage --exclude-dir=node_modules --exclude-dir='.*'" echo "# LaunchDarkly flags in components" >> $LD_LOG_FILE -(grep -r -n -o -w "useFlags().*" ./services --include=*.jsx --exclude=*.test.jsx --exclude-dir=coverage || echo "# None used") >> $LD_LOG_FILE +(grep $GREP_FLAGS "useFlags().*" ./services --include=*.jsx --exclude=*.test.jsx || echo "# None used") >> $LD_LOG_FILE echo "" >> $LD_LOG_FILE echo "# LaunchDarkly flags in tests" >> $LD_LOG_FILE -(grep -r -n -o -w "mockLDFlags.set.*" ./services --include=*.test.jsx --exclude-dir=coverage || echo "# None used") >> $LD_LOG_FILE +(grep $GREP_FLAGS "mockLDFlags.set.*" ./services --include=*.test.jsx || echo "# None used") >> $LD_LOG_FILE