-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from rtCamp/develop
Bump v0.10.0
- Loading branch information
Showing
61 changed files
with
6,094 additions
and
2,119 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,5 +1,5 @@ | ||
#!/usr/bin/env bash | ||
TAG='v0.9.0' | ||
TAG='v0.10.0' | ||
ARCH=$(uname -m) | ||
|
||
# arm64 | ||
|
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
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
fuser -k 80/tcp | ||
bench serve --port 80 |
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import sys | ||
import configparser | ||
from pathlib import Path | ||
|
||
print(sys.argv) | ||
conf_file_path= Path(sys.argv[1]) | ||
conf_file_absolute_path = conf_file_path.absolute() | ||
|
||
if not len(sys.argv) == 2: | ||
print(f"Generates individual program conf from supervisor.conf.\nUSAGE: {sys.argv[0]} SUPERVISOR_CONF_PATH\n\n SUPERVISOR_CONF_PATH -> Absolute path to supervisor.conf") | ||
sys.exit(0) | ||
|
||
config = configparser.ConfigParser(allow_no_value=True,strict=False,interpolation=None) | ||
|
||
superconf = open(conf_file_absolute_path,'r+') | ||
|
||
config.read_file(superconf) | ||
|
||
print(f"Divided {conf_file_absolute_path} into ") | ||
|
||
for section_name in config.sections(): | ||
if not 'group:' in section_name: | ||
|
||
section_config = configparser.ConfigParser(interpolation=None) | ||
section_config.add_section(section_name) | ||
for key, value in config.items(section_name): | ||
if 'frappe-bench-frappe-web' in section_name: | ||
if key == 'command': | ||
value = value.replace("127.0.0.1:80","0.0.0.0:80") | ||
section_config.set(section_name, key, value) | ||
|
||
if 'worker' in section_name: | ||
file_name = f"{section_name.replace('program:','')}.workers.fm.supervisor.conf" | ||
else: | ||
file_name = f"{section_name.replace('program:','')}.fm.supervisor.conf" | ||
|
||
with open(conf_file_path.parent / file_name, 'w') as section_file: | ||
section_config.write(section_file) | ||
print(f" - {section_name} => {file_name}") |
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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[program:frappe-bench-frappe-dev] | ||
command=/opt/user/bench-dev-server.sh | ||
priority=4 | ||
autostart=true | ||
autorestart=false | ||
stdout_logfile=/workspace/frappe-bench/logs/web.dev.log | ||
redirect_stderr=true | ||
user=frappe | ||
directory=/workspace/frappe-bench | ||
|
||
[program:frappe-bench-frappe-watch] | ||
command=bench watch | ||
priority=4 | ||
autostart=true | ||
autorestart=false | ||
stdout_logfile=/workspace/frappe-bench/logs/watch.dev.log | ||
redirect_stderr=true | ||
user=frappe | ||
directory=/workspace/frappe-bench | ||
|
||
[group:frappe-bench-dev] | ||
programs=frappe-bench-frappe-dev,frappe-bench-frappe-watch |
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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#!/bin/zsh | ||
emer() { | ||
echo "$1" | ||
exit 1 | ||
} | ||
|
||
[[ "${WAIT_FOR:-}" ]] || emer "The WAIT_FOR env is not given." | ||
[[ "${COMMAND:-}" ]] || emer "COMMAND is not given." | ||
|
||
if [[ ! "${TIMEOUT:-}" ]]; then | ||
TIMEOUT=300 | ||
fi | ||
if [[ ! "${CHECK_ITERATION:-}" ]]; then | ||
CHECK_ITERATION=10 | ||
fi | ||
|
||
file_to_check="${WAIT_FOR}" | ||
|
||
timeout_seconds="$TIMEOUT" | ||
|
||
start_time=$(date +%s) | ||
check_iteration="$CHECK_ITERATION" | ||
|
||
total_iteration=1 | ||
iteration=1 | ||
IFS=',' read -A files <<< "$file_to_check" | ||
while true; do | ||
all_files_exist=true | ||
|
||
for file in ${files[@]}; do | ||
if [[ ! -s "$file" ]]; then | ||
all_files_exist=false | ||
break | ||
fi | ||
done | ||
|
||
if $all_files_exist || [[ $(( $(date +%s) - start_time )) -ge "$timeout_seconds" ]]; then | ||
break | ||
fi | ||
|
||
sleep 1 | ||
((total_iteration++)) | ||
((iteration++)) | ||
if [ $((iteration % check_iteration)) -eq 0 ]; then | ||
echo "Checked $iteration times..." | ||
fi | ||
done | ||
|
||
if [[ "${CHANGE_DIR:-}" ]];then | ||
cd "$CHANGE_DIR" || true | ||
fi | ||
|
||
source /opt/user/.zshrc | ||
|
||
if $all_files_exist; then | ||
echo "$file_to_check populated within $total_iteration seconds." | ||
echo "Running Command: $COMMAND" | ||
eval "$COMMAND" | ||
else | ||
echo "$file_to_check did not populate within $timeout_seconds seconds. Giving Up" | ||
fi |
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
Oops, something went wrong.