Releases: fchastanet/bash-tools-framework
6.0.0
5.1.4
Full Changelog: 5.1.2...5.1.4
v5.1.3
Full Changelog: 4.0.2...5.1.3
4.0.4
plantuml added option --limit-size
Full Changelog: 4.0.0...4.0.4
plantuml has a new option --limit-size
that sets the env variable PLANTUML_LIMIT_SIZE
latest-command-configurator
Full Changelog: 4.0.0...5.0.0-command-configurator
4.0.0
shellcheckLint parallel processing
Full Changelog: 3.2.0...4.0.0
Tag: 4.0.0
shellcheckLint enhancements
Added ability to shellcheck all git files in parallel
using xargs with compatiility with json, json1,
checkstyle formats
Breaking changes
- removed bin/test binary
- removed bin/runBuildContainer
- removed Docker::runBuildContainer
- added GNU sed to alpine image
- changed runUnitTests hook to rely on a test.sh file
needed to be present in the target repository.
Github workflow
- refactored bin/doc
- ensure installRequirements executed
- removed uneeded steps for pre-commit
- unit test generate checkstyle even if error
- cspell - remove global dictionaries config key
and adapt cspell rules accordingly - replaced technote-space/workflow-conclusion-action@v3
by AbsoLouie/[email protected]
3.2.0
Improvements for bash-tools project
Improvements for bash-tools project
Full Changelog
Tag: 3.2.0
Breaking changes
N/A
Bug fixes
- UI::drawLine & UI::drawLineWithMsg
- better detection of tty not available
- newline added after the line
Compiler changes
- .framework-config ability to override DISPLAY_DURATION
Binaries changes
Implied by Bash framework functions below updates
- buildBinFiles - make it work with symlink on bash-tools-framework
- doc
- install shdoc only outside docker container
- install other dependencies hadolint, shellcheck
- installRequirements
- install other dependencies hadolint, shellcheck
Updated Bash framework functions
- Github::defaultInstall - displays success message with
version installed - Github::upgradeRelease - ability to install exact version
of a sofware using env variable EXACT_VERSION - Web::upgradeRelease - ability to install exact version
of a sofware using fifth argument - Retry::default ability to override max retries and delay
between attemps using env variables - Web::getReleases - added a message indicating what's
going on
New Bash framework functions
- Softwares::installShellcheck
- Softwares::installHadolint
Validation/Tooling
- align config with bash-tools
- added test.sh - replacement of bin/test
- use akatov/commit-status-updater@a9e988e
instead of ouzi-dev/commit-status-updater@v2 for node20 upgrade - fix docker build using gha cache
- github action
- not running for master branch, only for tags
- cancel previous build if several pushes
3.1.0
buildBinFiles & Github workflow improvements
Full Changelog: 3.0.0...3.1.0
buildBinFiles uses docker
Embed directories are using tar gz to embed files,
in order to keep the same tar.gz fingerprint,
we need to have a consistent environment.
So the compilation is done using docker image
scrasnups/build:bash-tools-ubuntu-5.3.
Github workflow improvements
- fix linting issues
- fix megalinter full codebase on master
- fix pre-commit step marked as red but rest of the job continue
- fixed doc generation
- prettier set singleQuote to false
- File::detectBashFile is now able to manager several files
impacting:- frameworkLint
- shellcheckLint
- findShebangFiles
- Commands.md doc generation - ensure new line is added after
help - migrated crazy-max/ghaction-import-gpg from v5 to v6
3.0.0
Improvements for bash-dev-env project
Pull Request: Bash dev env by @fchastanet in #67
Full Changelog: 84fea2a...3.0.0
Lazy loading and sudo
- Ability to call sudo optionally by added SUDO variable
on multiple functions. - Ability to skip loading some requirements.
Breaking changes
- Backup::dir - 2 modes with or without BACKUP_DIR set and better diagnostics logs
- Backup::file - 2 modes with or without BACKUP_DIR set and file name format changed
Compiler changes
- functions injection order due to changes implied by Filters::uniqUnsorted usage
Performance optimizations
- using bash variable expansion instead of dirname and basename
- removed usage of readlink and pwd where not useful
- call mkdir if directory does not exist
- replaced grep usage by bash regexp check on Assert::validVariableName
- replaced sed usage by bash expansion on
- Backup::file
- Linux::Wsl::getKeyFromWslpathOptions
- Compiler::Facade::generateFacadeScript
- WSL_DISTRO_NAME computation in Linux::Wsl::initEnv
- Created new set of wsl function to get wslpath and wslvar data in a more performant way.
Load cache file first time as associative array.- Cache::getPropertyValue2
- Linux::Wsl::cachedWslpath2
- Linux::Wsl::cachedWslpathFromWslVar2
- Linux::Wsl::cachedWslvar2
Old equivalent functions are marked as deprecated.
- Linux::getCodename and Linux::getDistributorId are using source /etc/os-release intead
of lsb_release -a - Log duration based on EPOCHREALTIME variable instead of date command
- created Filters::firstField using bash read to avoid awk usage
- using Filters::uniqUnsorted instead of awk '{$1=$1};1' | sort | uniq
so no sort needed anymore - stat -c "%a" instead of stat -c "%a %n" remove usage of awk
Binaries changes
- facadeDefault.tpl ability to inject script at the beginning of the facade function
- buildBinFiles v1.1
- added --ci option
--ci option makes buildBinFiles to fail if binaries has changed - better detection of the files needed to be compiled
- added --src-dir option
- take into account BINARIES_DIR from .framework-config file as default src-dirs
- added --ci option
- all binaries
- ensure all traps get and return original exit code
- frameworkLint - improved warning message when bash framework function
is prefixed with the function keyword - added bin/installRequirements
Bug fixes
- Compiler::Implement::validateInterfaceFunctions now accept one liner functions
- Github::defaultInstall use optional SUDO on mkdir
- Ssh::fixAuthenticityOfHostCantBeEstablished added diagnostics logs and creates
~/.ssh/known_hosts if does not exist yet - UI::drawLine default to 80 columns if width can't be computed
- Fixed regression on shellcheckLint binary because of Github::upgradeRelease changes
Updated Bash framework functions
- ability to call sudo optionally on several functions
- Linux::requireUbuntu accepts Debian too
- ability to skip loading some requirements using env var
- Linux::Wsl::initEnv
- Linux::Wsl::initEnv
- UI::requireTheme
- Github::upgradeRelease added argument parseVersionCallback
- Log::display*
- ability to display a context (using LOG_CONTEXT)
- display duration of last command if DISPLAY_DURATION is set to 1
- optimized UI::drawLine and added UI::drawLineWithMsg
- Install::file/dir/structure
- added diagnostics logs
- ability to call sudo optionally
- Install::dir - optional backup based on BACKUP_BEFORE_INSTALL env variable
- Install::file
- optional backup based on BACKUP_BEFORE_INSTALL env variable
- avoid copy and backup if src and target files do not differ
- Install::structure improved version of Install::dir
- Linux::requireJqCommand - ability to skip it using SKIP_REQUIRE_JQ or SKIP_REQUIRES env variable
- Github::upgradeRelease - ability to change some optional arg using env variable instead
- Linux::Apt::addRepository ability to SKIP_APT_GET_UPDATE
- Linux::getDistributorId and Linux::getCodename returned value can be slightly
different (case change) - Linux::Wsl::getKeyFromWslpathOptions some cleaning on the key
- Linux::Wsl::originalWslpath filters unwanted eols
- Linux::Apt::addRepository add repository only if needed
- Version::parse - stop at first match
- Github::upgradeRelease added CURL_CONNECT_TIMEOUT env variable
- Log::rotate log level changed from skipped to debug when file to rotate doesn't exist yet
- Assert::fileExists ability to skip ownership checks
- Git::cloneOrPullIfNoChanges - no more failure if changes detected
- Retry::parameterized - message Command failed lowered to debug level
- Profiles::loadProfile moved to bash-dev-env project
New Bash framework functions
- UI::talkToUser allowed to execute custom powershell script(eg: embedded script)
- added Linux::isSystemdRunning
- added Install::structure
- replicate directory structure
- for each file, execute Install::file hence managing
backup file by file
- added Assert::dirEmpty
- added Assert::dirNotExists
- added Assert::fileNotExists
- added Filters::firstField
- added Filters::uniqUnsorted
- added Linux::Apt::installIfNecessary
- added Linux::Apt::isPackageInstalled
- added Linux::Apt::repositoryExists checks if apt repository exists
- added Web::upgradeRelease in order to upgrade a software from web more generic
than Github::upgradeRelease - added Web::getReleases
- added Cache::getPropertyValue2
- added Linux::Wsl::cachedWslpath2
- added Linux::Wsl::cachedWslpathFromWslVar2
- added Linux::Wsl::cachedWslvar2
- added Log::computeDuration
- added UI::drawLineWithMsg
.env files changes
- .framework-config - display elapsed time since last log
Deprecations
- Linux::Wsl::cachedWslpath : use Linux::Wsl::cachedWslpath2 instead
- Cache::getPropertyValue : use Cache::getPropertyValue2 instead
- Linux::Wsl::cachedWslpathFromWslVar : use Linux::Wsl::cachedWslpathFromWslVar2 instead
- Linux::Wsl::cachedWslvar : use Linux::Wsl::cachedWslvar2 instead
Documentation
- applied linters/cspell suggestions
doc/guides/Options.md
fixed examplesdoc/guides/Options/functionArg.md
fixed examples
Validation/Tooling
-
upgraded megalinter from 7.10.0 to 7.11.1
-
updated precommit
- pre-commit hook fixShebangExecutionBitGithubActions
has been removed in favor to fixShebangExecutionBit - pre-commit hook frameworkLinter has been renamed to
frameworkLint - pre-commit hook frameworkLinterGithubAction has
been renamed to frameworkLintGithubAction - the following pre-commit hooks now logs output to
logs/**.xml in checkstyle format- shellcheckLintGithubAction
- awkLint
- fail fast management
- .pre-commit-config.yaml is fail_fast true
- .pre-commit-config-github.yaml is auto generated
with fail_fast false - github action uses .pre-commit-config-github.yaml
config
- added mdformat precommit hooks
- added several hooks from pre-commit/pre-commit-hooks
- added hook from codespell-project/codespell
- bash-framework hooks removed pre-push stage
- pre-commit added github workflow linter
- pre-commit hook fixShebangExecutionBitGithubActions
-
Github workflow improvements
- refactored github workflow with 4 separated jobs
- replaced bin/buildPushDockerImage by
docker/build-push-action@v5 allowing to use gihub
docker cache. - UT junit results
- create pull request using github App and gpg key
- added cache for pre-commit
- use megalinter github action instead of precommit
- added fchastanet/[email protected]
- use plain docker instructions in lint-test.yml
instead of relying on bin/test script
-
config alignement with bash-dev-env project
-
fix alpine build
-
docker images create a default www-data user
-
filters out some bats tests for alpine
-
fixed UT
- Install::structure make it work on alpine
- some UT specific to wsl are excluded from being tested
on alpine as sed -z is not supported and testing wsl
on this distribution is irrelevant.