71d8e49a3d
* fix: fixed transaction messages (#792) * Open Source + Docker image (#793) * feat: added dummy charting library * feat: added docker workflow * feat: remove tests and code-coverage * feat: added final TradingView fallback * env: set private to false * fix: added production env * env: added README and LICENSE * env: cleanup variables * env: add license field * env: finish docker setup * fix: updated the description of the dummy data
27 lines
816 B
Bash
27 lines
816 B
Bash
#!/bin/sh
|
|
|
|
remove_if_directory_exists() {
|
|
if [ -d "$1" ]; then rm -Rf "$1"; fi
|
|
}
|
|
|
|
BRANCH="master"
|
|
|
|
REPOSITORY="https://$CHARTING_LIBRARY_USERNAME:$CHARTING_LIBRARY_ACCESS_TOKEN@$CHARTING_LIBRARY_REPOSITORY"
|
|
|
|
LATEST_HASH=$(git ls-remote $REPOSITORY $BRANCH | grep -Eo '^[[:alnum:]]+')
|
|
|
|
remove_if_directory_exists "$LATEST_HASH"
|
|
|
|
git clone -q --depth 1 -b "$BRANCH" $REPOSITORY "$LATEST_HASH"
|
|
|
|
remove_if_directory_exists "public/charting_library"
|
|
remove_if_directory_exists "public/datafeeds"
|
|
remove_if_directory_exists "src/utils/charting_library"
|
|
remove_if_directory_exists "src/utils/datafeeds"
|
|
|
|
cp -r "$LATEST_HASH/charting_library" public/
|
|
cp -r "$LATEST_HASH/charting_library" src/utils/
|
|
cp -r "$LATEST_HASH/datafeeds" public/
|
|
cp -r "$LATEST_HASH/datafeeds" src/utils/
|
|
|
|
remove_if_directory_exists "$LATEST_HASH" |