Skip to content

Commit

Permalink
using bash-compiler v1.1.0
Browse files Browse the repository at this point in the history
- fixed log file path using BASH_TOOLS_ROOT_DIR base path
  • Loading branch information
fchastanet committed Sep 28, 2024
1 parent cd5a3ca commit bf4e181
Show file tree
Hide file tree
Showing 23 changed files with 80 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .framework-config
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ SRC_FILE_PATH="${CURRENT_COMPILED_RELATIVE_FILE#/}"
BASH_FRAMEWORK_THEME="${BASH_FRAMEWORK_THEME:-default}"
BASH_FRAMEWORK_LOG_LEVEL="${BASH_FRAMEWORK_LOG_LEVEL:-0}"
BASH_FRAMEWORK_DISPLAY_LEVEL="${BASH_FRAMEWORK_DISPLAY_LEVEL:-3}"
BASH_FRAMEWORK_LOG_FILE="${BASH_FRAMEWORK_LOG_FILE:-${FRAMEWORK_ROOT_DIR}/logs/${0##*/}.log}"
BASH_FRAMEWORK_LOG_FILE="${BASH_FRAMEWORK_LOG_FILE:-${BASH_TOOLS_ROOT_DIR}/logs/${0##*/}.log}"
BASH_FRAMEWORK_LOG_FILE_MAX_ROTATION="${BASH_FRAMEWORK_LOG_FILE_MAX_ROTATION:-5}"

# display elapsed time since last log
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config-github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ repos:
)$
- repo: https://github.com/rhysd/actionlint
rev: v1.7.1
rev: v1.7.2
hooks:
- id: actionlint
stages: [pre-commit, pre-push, manual]
Expand Down Expand Up @@ -210,6 +210,6 @@ repos:
stages: [manual] # GITHUB

- repo: https://github.com/fchastanet/bash-compiler
rev: v1.0.0
rev: v1.1.0
hooks:
- id: buildBashBinaries
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ repos:
)$
- repo: https://github.com/rhysd/actionlint
rev: v1.7.1
rev: v1.7.2
hooks:
- id: actionlint
stages: [pre-commit, pre-push, manual]
Expand Down Expand Up @@ -205,6 +205,6 @@ repos:
stages: [] # GITHUB

- repo: https://github.com/fchastanet/bash-compiler
rev: v1.0.0
rev: v1.1.0
hooks:
- id: buildBashBinaries
8 changes: 7 additions & 1 deletion bin/cli
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ DISPLAY_DURATION=${DISPLAY_DURATION:0}
### all log messages will be redirected to log file specified
### this same path will be used inside and outside of the container
###
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${FRAMEWORK_ROOT_DIR}/logs/bash.log}
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${BASH_TOOLS_ROOT_DIR}/logs/bash.log}
###
### LOG Level
Expand Down Expand Up @@ -1714,14 +1714,17 @@ cliCommandParse() {
((options_parse_optionParsedCountOptionQuiet = 0)) || true

containerArg=""

local -i options_parse_argParsedCountContainerArg
((options_parse_argParsedCountContainerArg = 0)) || true

userArg=""

local -i options_parse_argParsedCountUserArg
((options_parse_argParsedCountUserArg = 0)) || true

commandArg=""

local -i options_parse_argParsedCountCommandArg
((options_parse_argParsedCountCommandArg = 0)) || true

Expand Down Expand Up @@ -2105,14 +2108,17 @@ cliCommandHelp() {
containerArgHelpFunction



Array::wrap2 " " 80 2 " [${__HELP_OPTION_COLOR}user${__HELP_NORMAL} {single}]"
userArgHelpFunction



Array::wrap2 " " 80 2 " [${__HELP_OPTION_COLOR}command${__HELP_NORMAL} {single}]"
commandArgHelpFunction



# ------------------------------------------
# options section
# ------------------------------------------
Expand Down
6 changes: 5 additions & 1 deletion bin/dbImport
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ DISPLAY_DURATION=${DISPLAY_DURATION:0}
### all log messages will be redirected to log file specified
### this same path will be used inside and outside of the container
###
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${FRAMEWORK_ROOT_DIR}/logs/bash.log}
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${BASH_TOOLS_ROOT_DIR}/logs/bash.log}
###
### LOG Level
Expand Down Expand Up @@ -2083,10 +2083,12 @@ dbImportCommandParse() {
((options_parse_optionParsedCountOptionQuiet = 0)) || true

fromDbName=""

local -i options_parse_argParsedCountFromDbName
((options_parse_argParsedCountFromDbName = 0)) || true

targetDbName=""

local -i options_parse_argParsedCountTargetDbName
((options_parse_argParsedCountTargetDbName = 0)) || true

Expand Down Expand Up @@ -2637,10 +2639,12 @@ dbImportCommandHelp() {
Array::wrap2 ' ' 76 4 " " "The name of the source/remote database."
echo


Array::wrap2 " " 80 2 " [${__HELP_OPTION_COLOR}<targetDbName>${__HELP_NORMAL} {single}]"
Array::wrap2 ' ' 76 4 " " "The name of the target database" "Default value: <fromDbName>(without extension)" ""
echo


# ------------------------------------------
# options section
# ------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion bin/dbImportProfile
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ DISPLAY_DURATION=${DISPLAY_DURATION:0}
### all log messages will be redirected to log file specified
### this same path will be used inside and outside of the container
###
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${FRAMEWORK_ROOT_DIR}/logs/bash.log}
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${BASH_TOOLS_ROOT_DIR}/logs/bash.log}
###
### LOG Level
Expand Down Expand Up @@ -1894,6 +1894,7 @@ dbImportProfileCommandParse() {
((options_parse_optionParsedCountOptionQuiet = 0)) || true

fromDbName=""

local -i options_parse_argParsedCountFromDbName
((options_parse_argParsedCountFromDbName = 0)) || true

Expand Down Expand Up @@ -2332,6 +2333,7 @@ dbImportProfileCommandHelp() {
Array::wrap2 ' ' 76 4 " " "The name of the source/remote database."
echo


# ------------------------------------------
# options section
# ------------------------------------------
Expand Down
6 changes: 5 additions & 1 deletion bin/dbImportStream
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ DISPLAY_DURATION=${DISPLAY_DURATION:0}
### all log messages will be redirected to log file specified
### this same path will be used inside and outside of the container
###
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${FRAMEWORK_ROOT_DIR}/logs/bash.log}
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${BASH_TOOLS_ROOT_DIR}/logs/bash.log}
###
### LOG Level
Expand Down Expand Up @@ -1918,10 +1918,12 @@ dbImportStreamCommandParse() {
((options_parse_optionParsedCountOptionQuiet = 0)) || true

argDumpFile=""

local -i options_parse_argParsedCountArgDumpFile
((options_parse_argParsedCountArgDumpFile = 0)) || true

argTargetDbName=""

local -i options_parse_argParsedCountArgTargetDbName
((options_parse_argParsedCountArgTargetDbName = 0)) || true

Expand Down Expand Up @@ -2402,10 +2404,12 @@ dbImportStreamCommandHelp() {
Array::wrap2 ' ' 76 4 " " "The file that will be streamed through mysql."
echo


Array::wrap2 " " 80 2 " ${__HELP_OPTION_COLOR}argTargetDbName${__HELP_NORMAL} {single} (mandatory)"
Array::wrap2 ' ' 76 4 " " "The name of the mysql target database."
echo


# ------------------------------------------
# options section
# ------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion bin/dbQueryAllDatabases
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ DISPLAY_DURATION=${DISPLAY_DURATION:0}
### all log messages will be redirected to log file specified
### this same path will be used inside and outside of the container
###
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${FRAMEWORK_ROOT_DIR}/logs/bash.log}
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${BASH_TOOLS_ROOT_DIR}/logs/bash.log}
###
### LOG Level
Expand Down Expand Up @@ -1948,6 +1948,7 @@ dbQueryAllDatabasesCommandParse() {
((options_parse_optionParsedCountOptionSeparator = 0)) || true

argQuery=""

local -i options_parse_argParsedCountArgQuery
((options_parse_argParsedCountArgQuery = 0)) || true

Expand Down Expand Up @@ -2409,6 +2410,7 @@ dbQueryAllDatabasesCommandHelp() {
argQueryHelpFunction



# ------------------------------------------
# options section
# ------------------------------------------
Expand Down
5 changes: 4 additions & 1 deletion bin/dbScriptAllDatabases
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ DISPLAY_DURATION=${DISPLAY_DURATION:0}
### all log messages will be redirected to log file specified
### this same path will be used inside and outside of the container
###
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${FRAMEWORK_ROOT_DIR}/logs/bash.log}
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${BASH_TOOLS_ROOT_DIR}/logs/bash.log}
###
### LOG Level
Expand Down Expand Up @@ -1852,6 +1852,7 @@ dbScriptAllDatabasesCommandParse() {
((options_parse_optionParsedCountOptionLogFormat = 0)) || true

argScriptToExecute=""

local -i options_parse_argParsedCountArgScriptToExecute
((options_parse_argParsedCountArgScriptToExecute = 0)) || true

Expand Down Expand Up @@ -2369,10 +2370,12 @@ dbScriptAllDatabasesCommandHelp() {
Array::wrap2 ' ' 76 4 " " "The script that will be executed on each databases."
echo


Array::wrap2 " " 80 2 " [${__HELP_OPTION_COLOR}scriptArguments${__HELP_NORMAL} {list} (optional)]"
Array::wrap2 ' ' 76 4 " " "Optional parameters to pass to the script."
echo


# ------------------------------------------
# options section
# ------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion bin/doc
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ DISPLAY_DURATION=${DISPLAY_DURATION:0}
### all log messages will be redirected to log file specified
### this same path will be used inside and outside of the container
###
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${FRAMEWORK_ROOT_DIR}/logs/bash.log}
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${BASH_TOOLS_ROOT_DIR}/logs/bash.log}
###
### LOG Level
Expand Down
6 changes: 5 additions & 1 deletion bin/gitIsAncestorOf
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ DISPLAY_DURATION=${DISPLAY_DURATION:0}
### all log messages will be redirected to log file specified
### this same path will be used inside and outside of the container
###
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${FRAMEWORK_ROOT_DIR}/logs/bash.log}
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${BASH_TOOLS_ROOT_DIR}/logs/bash.log}
###
### LOG Level
Expand Down Expand Up @@ -1385,10 +1385,12 @@ gitIsAncestorOfCommandParse() {
((options_parse_optionParsedCountOptionQuiet = 0)) || true

claimedBranchArg=""

local -i options_parse_argParsedCountClaimedBranchArg
((options_parse_argParsedCountClaimedBranchArg = 0)) || true

refArg=""

local -i options_parse_argParsedCountRefArg
((options_parse_argParsedCountRefArg = 0)) || true

Expand Down Expand Up @@ -1785,10 +1787,12 @@ gitIsAncestorOfCommandHelp() {
Array::wrap2 ' ' 76 4 " " "The branch in which the ref will be searched."
echo


Array::wrap2 " " 80 2 " ${__HELP_OPTION_COLOR}ref${__HELP_NORMAL} {single} (mandatory)"
Array::wrap2 ' ' 76 4 " " "The ref to check."
echo


# ------------------------------------------
# options section
# ------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion bin/gitIsBranch
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ DISPLAY_DURATION=${DISPLAY_DURATION:0}
### all log messages will be redirected to log file specified
### this same path will be used inside and outside of the container
###
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${FRAMEWORK_ROOT_DIR}/logs/bash.log}
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${BASH_TOOLS_ROOT_DIR}/logs/bash.log}
###
### LOG Level
Expand Down Expand Up @@ -1384,6 +1384,7 @@ gitIsBranchCommandParse() {
((options_parse_optionParsedCountOptionQuiet = 0)) || true

branchNameArg=""

local -i options_parse_argParsedCountBranchNameArg
((options_parse_argParsedCountBranchNameArg = 0)) || true

Expand Down Expand Up @@ -1760,6 +1761,7 @@ gitIsBranchCommandHelp() {
Array::wrap2 ' ' 76 4 " " "The branch name to check."
echo


# ------------------------------------------
# options section
# ------------------------------------------
Expand Down
6 changes: 5 additions & 1 deletion bin/gitRenameBranch
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ DISPLAY_DURATION=${DISPLAY_DURATION:0}
### all log messages will be redirected to log file specified
### this same path will be used inside and outside of the container
###
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${FRAMEWORK_ROOT_DIR}/logs/bash.log}
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${BASH_TOOLS_ROOT_DIR}/logs/bash.log}
###
### LOG Level
Expand Down Expand Up @@ -1443,10 +1443,12 @@ gitRenameBranchCommandParse() {
((options_parse_optionParsedCountOptionDelete = 0)) || true

newBranchNameArg=""

local -i options_parse_argParsedCountNewBranchNameArg
((options_parse_argParsedCountNewBranchNameArg = 0)) || true

oldBranchNameArg=""

local -i options_parse_argParsedCountOldBranchNameArg
((options_parse_argParsedCountOldBranchNameArg = 0)) || true

Expand Down Expand Up @@ -1885,10 +1887,12 @@ gitRenameBranchCommandHelp() {
Array::wrap2 ' ' 76 4 " " "The new branch name."
echo


Array::wrap2 " " 80 2 " [${__HELP_OPTION_COLOR}oldBranchName${__HELP_NORMAL} {single}]"
Array::wrap2 ' ' 76 4 " " "The name of the old branch if not current one."
echo


# ------------------------------------------
# options section
# ------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion bin/installRequirements
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ DISPLAY_DURATION=${DISPLAY_DURATION:0}
### all log messages will be redirected to log file specified
### this same path will be used inside and outside of the container
###
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${FRAMEWORK_ROOT_DIR}/logs/bash.log}
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${BASH_TOOLS_ROOT_DIR}/logs/bash.log}
###
### LOG Level
Expand Down
4 changes: 3 additions & 1 deletion bin/mysql2puml
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ DISPLAY_DURATION=${DISPLAY_DURATION:0}
### all log messages will be redirected to log file specified
### this same path will be used inside and outside of the container
###
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${FRAMEWORK_ROOT_DIR}/logs/bash.log}
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${BASH_TOOLS_ROOT_DIR}/logs/bash.log}
###
### LOG Level
Expand Down Expand Up @@ -1446,6 +1446,7 @@ mysql2pumlCommandParse() {
((options_parse_optionParsedCountOptionSkin = 0)) || true

inputSqlFile=""

local -i options_parse_argParsedCountInputSqlFile
((options_parse_argParsedCountInputSqlFile = 0)) || true

Expand Down Expand Up @@ -1825,6 +1826,7 @@ mysql2pumlCommandHelp() {
Array::wrap2 ' ' 76 4 " " "Sql filepath to parse (read from stdin if not provided)."
echo


# ------------------------------------------
# options section
# ------------------------------------------
Expand Down
Loading

0 comments on commit bf4e181

Please sign in to comment.