-
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.
Migrated to bash-tools-framework 2.1.0 (#26)
Rewrite all the binaries using bash-tools-framework 2.1.0 New bin/upgradeGithubRelease Better validation pipeline and pre-commit config # Breaking changes - Migrated to bash-tools-framework 2.1.0 - Now using .framework-config - Removed bash-tools-framework binaries that were copied to bin directory - moved Installers/installDockerInWsl.sh to bash-dev-env project - Repository structure changed - moved binary files to src/_binaries folder - moved bats files in same directory as tested file - renamed ROOT_DIR to FRAMEWORK_ROOT_DIR or BASH_TOOLS_ROOT_DIR - renamed BIN_DIR to COMMAND_BIN_DIR - cut header.tpl in _header.tpl and _load.tpl - removed other _header*.tpl files - binaries - fixed colors were replaced during compilation # Bug fixes - fix issue when bash-tools-framework dir does not exists yet - fix doc - buildPushDockerImages from framework - updated framework - framework refact Profiles::* to Conf::* - fixed REPOSITORY_URL + removed author.tpl # Binaries changes - added upgradeGithubRelease - all the binaries set as v2.0 are using - bash-tools-framework new facade template - bash-tools-framework Options capabilities - global options: - --bash-framework-config - --config {single} - --verbose, -v {single} - -vv {single} - -vvv {single} - --env-file <String> {list} (optional) - --no-color {single} - --theme <String> {single} - --help, -h {single} - --version {single} - --quiet, -q {single} - --log-level <String> {single} - --log-file <String> {single} - --display-level <String> {single} - options specifics to each binary - --help option automatically uses Array::wrap2 improving performances - options standardization - use of compile dynamicSrcFile/dynamicTemplateDir/dynamicSrcDir helpers - added new unit tests - src/_binaries/Git/upgradeGithubRelease.bats - src/_binaries/Utils/waitForIt.bats - src/_binaries/Utils/waitForMysql.bats - src/_binaries/DbImport/dbImportStream.bats - src/_binaries/Git/gitIsAncestorOf.bats - Removed bin/dbQueryOneDatabase directly used as embedded binary in - bin/dbQueryAllDatabases - bin/dbScriptAllDatabases - removed build.sh script replaced by `vendor/bash-tools-framework/bin/buildBinFiles` - installRequirements is now just installing bash-tools-framework - Removed bash-tools-framework binaries that were copied to bin directory - all the compilation, linters, test tools are using the ones coming from bash-tools-framework. - pages/Commands.md is no more referencing bash-tools-framework binaries. # Documentation - added ShellDoc::fixMarkdownToc to fix docsify navigation # Validation/Tooling - .pre-commit-config.yaml is now using bash-tools-framework pre-commit hooks - added shellcheckLint and frameworkLint - fixed linter issues - migrated from megalinter 6.16.0 to megalinter 7.7 - added several megalinter linters + applied related fixes - github actions - added .github/dependabot.yml allowing to check github actions updates - upgraded github actions to latest versions - use the same strategy as bash-tools-framework using pre-commit hooks to validate files - automatically creates pull request if updated files after pre-commit - vscode - added extensions - added bashdb debug configuration
- Loading branch information
1 parent
4949079
commit ddba2b5
Showing
245 changed files
with
31,935 additions
and
12,695 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
skip-path: | ||
- vendor |
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
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 |
---|---|---|
|
@@ -198,3 +198,11 @@ difftool | |
apos | ||
hpdy | ||
tagname | ||
Aftertabs | ||
GKHF | ||
cyclonedx | ||
cpes | ||
UNINDEXED | ||
unindexed | ||
logrus | ||
JSONLINT |
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,40 @@ | ||
Lorem | ||
ipsum | ||
dolor | ||
sit | ||
amet | ||
consectetur | ||
adipiscing | ||
elit | ||
Maecenas | ||
vel | ||
eros | ||
id | ||
ipsum | ||
lobortis | ||
cursus | ||
id | ||
dignissim | ||
turpis | ||
Nam | ||
pretium | ||
placerat | ||
nulla | ||
in | ||
posuere | ||
Mauris | ||
libero | ||
purus | ||
aliquet | ||
et | ||
commodo | ||
quis | ||
semper | ||
sit | ||
amet | ||
sapien | ||
Curabitur | ||
condimentum | ||
finibus | ||
abitur | ||
fini |
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 |
---|---|---|
|
@@ -149,3 +149,8 @@ docsify | |
htmlhintrc | ||
gitleaks | ||
nojekyll | ||
RUBOCOP | ||
TRIVY | ||
KICS | ||
TRUFFLEHOG | ||
GRYPE |
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,20 @@ | ||
{ | ||
"Verbose": false, | ||
"Debug": false, | ||
"IgnoreDefaults": false, | ||
"SpacesAftertabs": false, | ||
"NoColor": false, | ||
"Exclude": [ | ||
"/testsData/" | ||
], | ||
"AllowedContentTypes": [], | ||
"PassedFiles": [], | ||
"Disable": { | ||
"EndOfLine": false, | ||
"Indentation": false, | ||
"IndentSize": false, | ||
"InsertFinalNewline": false, | ||
"TrimTrailingWhitespace": false, | ||
"MaxLineLength": false | ||
} | ||
} |
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
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,52 @@ | ||
#!/usr/bin/env bash | ||
# shellcheck disable=SC2034 | ||
|
||
BASH_TOOLS_ROOT_DIR="$(cd -- "$(dirname -- "${CURRENT_LOADED_ENV_FILE}")" &>/dev/null && pwd -P)" | ||
FRAMEWORK_ROOT_DIR="${BASH_TOOLS_ROOT_DIR}/vendor/bash-tools-framework" | ||
FRAMEWORK_SRC_DIR="${FRAMEWORK_ROOT_DIR}/src" | ||
FRAMEWORK_BIN_DIR="${FRAMEWORK_ROOT_DIR}/bin" | ||
FRAMEWORK_VENDOR_DIR="${FRAMEWORK_ROOT_DIR}/vendor" | ||
FRAMEWORK_VENDOR_BIN_DIR="${FRAMEWORK_VENDOR_DIR}/bin" | ||
|
||
# allows to generate bin file in the right directory | ||
export BASH_TOOLS_ROOT_DIR | ||
|
||
# compile parameters | ||
# srcFile : file that needs to be compiled | ||
# templateDir : directory from which bash-tpl templates will be searched | ||
# binDir : fallback bin directory in case BIN_FILE has not been provided | ||
# rootDir : directory used to compute src file relative path | ||
# srcDirs : additional directories where to find the functions | ||
COMPILE_PARAMETERS=( | ||
--src-dir "${BASH_TOOLS_ROOT_DIR}/src" | ||
--src-dir "${FRAMEWORK_ROOT_DIR}/src" | ||
--bin-dir "${BASH_TOOLS_ROOT_DIR}/bin" | ||
--root-dir "${BASH_TOOLS_ROOT_DIR}" | ||
--template-dir "${BASH_TOOLS_ROOT_DIR}/src" | ||
) | ||
|
||
# describe the functions that will be skipped from being imported | ||
FRAMEWORK_FUNCTIONS_IGNORE_REGEXP="${FRAMEWORK_FUNCTIONS_IGNORE_REGEXP:-^(Namespace::functions|Functions::myFunction|Namespace::requireSomething|IMPORT::dir::file|Acquire::ForceIPv4)$}" | ||
# describe the files that do not contain function to be imported | ||
NON_FRAMEWORK_FILES_REGEXP="${NON_FRAMEWORK_FILES_REGEXP:-(^bin/|.framework-config|^install$|.bats$|/testsData/|^manualTests/|/_.sh$|/ZZZ.sh$|/__all.sh$|^src/_binaries|^src/_includes|^src/batsHeaders.sh$|^conf/)}" | ||
# describe the files that are allowed to not have an associated bats file | ||
BATS_FILE_NOT_NEEDED_REGEXP="${BATS_FILE_NOT_NEEDED_REGEXP:-(^conf/|^bin/|.framework-config|^install$|.bats$|/testsData/|^manualTests/|/_.sh$|/ZZZ.sh$|/__all.sh$|^src/batsHeaders.sh$|^src/_includes)}" | ||
# describe the files that are allowed to not have a function matching the filename | ||
FRAMEWORK_FILES_FUNCTION_MATCHING_IGNORE_REGEXP="${FRAMEWORK_FILES_FUNCTION_MATCHING_IGNORE_REGEXP:-^conf/|^bin/|^\.framework-config$|\.tpl$|testsData/binaryFile$}" | ||
# Source directories | ||
if [[ ! -v FRAMEWORK_SRC_DIRS ]]; then | ||
FRAMEWORK_SRC_DIRS=( | ||
"${BASH_TOOLS_ROOT_DIR}/src" | ||
"${FRAMEWORK_SRC_DIR}" | ||
) | ||
fi | ||
|
||
# export here all the variables that will be used in your templates | ||
export REPOSITORY_URL="${REPOSITORY_URL:-https://github.com/fchastanet/bash-tools}" | ||
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/$(basename "$0").log}" | ||
BASH_FRAMEWORK_LOG_FILE_MAX_ROTATION="${BASH_FRAMEWORK_LOG_FILE_MAX_ROTATION:-5}" |
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,11 @@ | ||
# Set update schedule for GitHub Actions | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
schedule: | ||
# Check for updates to GitHub Actions every week | ||
interval: 'weekly' | ||
day: 'friday' | ||
open-pull-requests-limit: 1 |
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
Oops, something went wrong.