Gaëtan Renaudeau
7 years ago
committed by
GitHub
7 changed files with 31 additions and 28 deletions
@ -1,10 +1,10 @@ |
|||||
#!/bin/bash |
#!/bin/bash |
||||
|
|
||||
if [ -z $ANALYTICS_KEY ]; then |
if [ -z "$ANALYTICS_KEY" ]; then |
||||
echo 'ANALYTICS_KEY must be set' |
echo 'ANALYTICS_KEY must be set' |
||||
exit 1 |
exit 1 |
||||
fi |
fi |
||||
|
|
||||
cd `dirname $0`/.. |
cd "$(dirname "$0")/.." || exit |
||||
|
|
||||
wget https://cdn.segment.com/analytics.js/v1/$ANALYTICS_KEY/analytics.min.js -O static/analytics.min.js |
wget https://cdn.segment.com/analytics.js/v1/"$ANALYTICS_KEY"/analytics.min.js -O static/analytics.min.js |
||||
|
@ -1,13 +1,14 @@ |
|||||
#!/bin/bash |
#!/bin/bash |
||||
|
|
||||
|
# shellcheck disable=SC1091 |
||||
source scripts/hash-utils.sh |
source scripts/hash-utils.sh |
||||
|
|
||||
PACKAGE_JSON_HASH=`md5sum package.json | cut -d ' ' -f 1` |
PACKAGE_JSON_HASH=$(md5sum package.json | cut -d ' ' -f 1) |
||||
CACHED_PACKAGE_JSON_HASH=`GET_HASH 'package.json'` |
CACHED_PACKAGE_JSON_HASH=$(GET_HASH 'package.json') |
||||
|
|
||||
if [ "$CACHED_PACKAGE_JSON_HASH" == "$PACKAGE_JSON_HASH" ]; then |
if [ "$CACHED_PACKAGE_JSON_HASH" == "$PACKAGE_JSON_HASH" ]; then |
||||
echo "> Skipping yarn install" |
echo "> Skipping yarn install" |
||||
else |
else |
||||
yarn install |
yarn install |
||||
SET_HASH 'package.json' $PACKAGE_JSON_HASH |
SET_HASH 'package.json' "$PACKAGE_JSON_HASH" |
||||
fi |
fi |
||||
|
Loading…
Reference in new issue