Compare commits

...

2 Commits

Author SHA1 Message Date
Theunis J. Botha 5b48b2fbf0 starting with systems 2021-07-05 10:21:42 +02:00
Theunis J. Botha cf9c7c122e starting with systems 2021-07-05 10:21:30 +02:00
4 changed files with 13 additions and 7 deletions

View File

@ -21,7 +21,7 @@ services:
- ${R3_CONTEXT}/.r3_history:/app/.r3_history - ${R3_CONTEXT}/.r3_history:/app/.r3_history
networks: networks:
- r3_network - r3_network
command: "start" command: "build"
restart: unless-stopped restart: unless-stopped
networks: networks:
r3_network: r3_network:

View File

@ -9,7 +9,7 @@ r3_completions() {
# TASK=${#COMP_WORDS[1]} # TASK=${#COMP_WORDS[1]}
if [ "${#COMP_WORDS[@]}" == "2" ]; then if [ "${#COMP_WORDS[@]}" == "2" ]; then
COMPREPLY=($(compgen -W "build-graph create build-events update-options update-templates update-methods update-token-db" "${COMP_WORDS[1]}")) COMPREPLY=($(compgen -W "build-dist create build-events update-options update-templates update-methods update-token-db" "${COMP_WORDS[1]}"))
fi fi
if [[ "${#COMP_WORDS[@]}" == "3" && ( "${COMP_WORDS[1]}" == "update-templates" || "${COMP_WORDS[1]}" == "update-options" || "${COMP_WORDS[1]}" == "update-methods" ) ]]; then if [[ "${#COMP_WORDS[@]}" == "3" && ( "${COMP_WORDS[1]}" == "update-templates" || "${COMP_WORDS[1]}" == "update-options" || "${COMP_WORDS[1]}" == "update-methods" ) ]]; then

@ -1 +1 @@
Subproject commit 0bd771da31a68e56daf1620df2216cd4538534f1 Subproject commit 3c955fe495a9a200cded1aa8d4b472a413118300

14
r3.sh
View File

@ -1,5 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
PATCH=0
usage() { usage() {
echo "Usage : r3 <task> <container>" echo "Usage : r3 <task> <container>"
} }
@ -218,7 +220,7 @@ then
# exit 5 # exit 5
# fi # fi
# #
# ./update_templates.php all build-graph # ./update_templates.php all build-dist
# #
# cd - 2>&1 || exit 3 # cd - 2>&1 || exit 3
@ -267,7 +269,7 @@ check_file_found() {
} }
if [ "${TASK}" = 'build-graph' ]; if [ "${TASK}" = 'build-dist' ];
then then
echo "building graph" echo "building graph"
@ -278,7 +280,7 @@ then
# grep -n "^class.*extends" src/r3/* -R | sed "s/src\/r3\(.*\).js.*class\s*\(.*\) extends \(.*\) {/R3.\3.\2 = require('.\1.js');/" | sed "s/R3Object/Object/" # grep -n "^class.*extends" src/r3/* -R | sed "s/src\/r3\(.*\).js.*class\s*\(.*\) extends \(.*\) {/R3.\3.\2 = require('.\1.js');/" | sed "s/R3Object/Object/"
./update_templates.php all build-graph ./update_templates.php all build-dist
cd - 2>&1 || exit 3 cd - 2>&1 || exit 3
@ -294,6 +296,10 @@ then
cd "${R3_V2_LIB_PATH}" 2>&1 || exit 3 cd "${R3_V2_LIB_PATH}" 2>&1 || exit 3
# bump version
# shellcheck disable=SC2016
sed -i -E 's/([0-9]+\.[0-9]+\.)([0-9]+)/echo "\1$((\2+1))"/e' version
COMMANDS=$(grep "r3 create" .r3_history | sed "s/^.*r3 /r3 /" | sed "s/\s+/ /g" | sort --unique | perl -pe "s/\n/,/" | perl -pe "s/\s+,/,/g" | perl -pe "s/,$//") COMMANDS=$(grep "r3 create" .r3_history | sed "s/^.*r3 /r3 /" | sed "s/\s+/ /g" | sort --unique | perl -pe "s/\n/,/" | perl -pe "s/\s+,/,/g" | perl -pe "s/,$//")
FILES=$(grep "r3 create" .r3_history | sed "s/^.*r3 /r3 /" | sed "s/\s+/ /g" | sort --unique | cut -d' ' -f3 | sed 's/\([A-Z]\)/-\1/g' | awk '{print tolower($0)}' | sed "s/^/r3/" | sed "s/$/.js/") FILES=$(grep "r3 create" .r3_history | sed "s/^.*r3 /r3 /" | sed "s/\s+/ /g" | sort --unique | cut -d' ' -f3 | sed 's/\([A-Z]\)/-\1/g' | awk '{print tolower($0)}' | sed "s/^/r3/" | sed "s/$/.js/")
@ -348,7 +354,7 @@ then
echo "building graph" echo "building graph"
./update_templates.php all build-graph ./update_templates.php all build-dist
cd - 2>&1 || exit 3 cd - 2>&1 || exit 3