forked from SilentDemonSD/pyTele-Loader
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Docker ! HK doesn't support !
- Loading branch information
1 parent
6f1e3fd
commit d911d45
Showing
1 changed file
with
26 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,33 @@ | ||
#!/bin/bash | ||
|
||
#!/bin/bash | ||
repo_url=$REPO_URL | ||
if [ -z "$repo_url" ]; then | ||
echo "REPO_URL environment variable is not set. Set and Restart. Exiting ..." | ||
repo_branch=$REPO_BRANCH | ||
|
||
if [ -z "$repo_url" ] || [ -z "$repo_branch" ]; then | ||
echo "REPO_URL or REPO_BRANCH environment variable is not set. Set it and Restart..." | ||
exit 1 | ||
fi | ||
|
||
git clone "$repo_url" hk_dep | ||
cd hk_dep | ||
pip install -r requirements.txt | ||
if [ -d ".git" ]; then | ||
rm -rf .git | ||
fi | ||
|
||
has_docker=$HAS_DOCKER | ||
if [ "$has_docker" = "true" ]; then | ||
if [ -f "Dockerfile" ]; then | ||
docker build -t hk_load . | ||
docker run -it hk_load | ||
else | ||
echo "Dockerfile does not exist. Make a Dockerfile and Restart." | ||
exit 1 | ||
fi | ||
else | ||
start_cmd=$START_CMD | ||
if [ ! -z "$start_cmd" ]; then | ||
eval "$start_cmd" | ||
else | ||
python main.py | ||
git init -q | ||
git config --global user.email drxxstrange@gmail.com | ||
git config --global user.name SilentDemonSD | ||
git remote add origin $repo_url | ||
git fetch origin -q | ||
git reset --hard origin/$repo_branch -q | ||
|
||
if [ ! -f ".req_installed" ]; then | ||
pip install -r requirements.txt | ||
touch .req_installed | ||
fi | ||
|
||
start_cmd=$START_CMD | ||
if [ ! -z "$start_cmd" ]; then | ||
echo "HK-Loader : https://github.com/SilentDemonSD/HK-Loader | Thanks for Using, Now set Other Vars from Settings in Heroku." | ||
fi | ||
eval "$start_cmd" | ||
else | ||
echo "START_CMD not specified. Exiting Now ..." | ||
exit 1 | ||
fi |