Repository navigation
Releases
0.7.0
What's Changed
Main Changes
We've added the option to use modes in load_secrets (4cfcc86).
Previous:
load_secrets
load_secrets my_fileThe previous implementation assumed a hard mode, meaning that environment variables would be overwritten by the file content in case of collision.
Current:
load_secrets
load_secrets my_file
load_secrets my_file hard
load_secrets my_file softNow, with this version, it's possible to use the soft mode as well. In soft mode, existing variables will not be overwritten when loading new ones if they don't exist previously.
Note: This change doesn't break retrocompatibility, so no migration is required. We assume that you still use the hard mode by default.
Note: This does not break the retrocompatibility, so no migration is required. We assume that you use the hard mode by default.
PRs
- feat: add mode to load_secrets function by @UlisesGascon in #31
- Bump to 0.7.0 by @UlisesGascon in #32
Changelog
- febeeaa chore: bump to 0.7.0 by @UlisesGascon
- 4cfcc86 feat: add mode to load_secrets function by @UlisesGascon
Full Changelog: 0.6.1...0.7.0
0.6.1
What's Changed
Main Changes
- Bump to
0.6.1(6aa3939)
PRs
- Bump to 0.6.1 by @UlisesGascon in #30
Changelog
- 6aa3939 chore: bump to 0.6.1 by @UlisesGascon
Full Changelog: 0.6.0...0.6.1
0.6.0
What's Changed
Main Changes
- Added
check_environmental_variable_valueto secrets utils (f0ae653)
PRs
- Add check_environmental_variable_value to secrets utils by @UlisesGascon in #29
Changelog
- f0ae653 feat: add
check_environmental_variable_valueto secrets utils by @UlisesGascon
Full Changelog: 0.5.0...0.6.0
0.5.0
What's Changed
Main Changes
- Bump to 0.5.0 (ac3965e)
- Added
check_websockets_availabilityfunction (d0dcda3) - Improved error messaging for
check_http_availabilityfunction (f2d4270) - Drop
check_local_websockets_availabilityfunction (038d1c6)
Breaking Changes
If you use checks against websockets, you will need to migrate as check_local_websockets_availability was removed (038d1c6), now you can use check_websockets_availability function instead (d0dcda3).
Migration example
check_local_websockets_availability 8080
check_websockets_availability http://localhost:8080
# By default it will wait 5 seconds for the service to be available, but you can change it
check_websockets_availability http://localhost:8080 10PRs
- Drop check_local_websockets_availability function by @UlisesGascon in #26
- Improved Network functions by @UlisesGascon in #27
- Bump to 0.5.0 by @UlisesGascon in #28
Changelog
- ac3965e chore: bump to 0.5.0 by @UlisesGascon
- d0dcda3 feat: add
check_websockets_availabilityfunction by @UlisesGascon - f2d4270 feat: improve error messaging for
check_http_availabilityfunction by @UlisesGascon - 038d1c6 chore: drop
check_local_websockets_availabilityfunction by @UlisesGascon
Full Changelog: 0.4.0...0.5.0
0.4.0
What's Changed
Main Changes
- Bump to 0.4.0 (b57441d)
- Rewrite
build_docker_simple_image(1d225eb) - Rewrite
git_checkout_branch(a28950b) - Replace
returnforexit(a334ad8)
Breaking Changes
- Replace
returnforexit(a334ad8) - This means that errors now will
exit 1the execution and not justreturn 1. 🔥 This can change the behaviour in your scripts. - Rewrite
git_checkout_branch(a28950b)- Replaced
git show-refforgit ls-remote - Use subshells to avoid change directory in the main script as side effect. This will break your scripts if you relayed in the (unexpected) Directory change
- Replaced
- Rewrite
build_docker_simple_image(1d225eb)- Throw error when
image_nameis not provided - Renamed internal variables
- Added support for additional arguments
- Added support for subpaths by using subshells. This will break your scripts if you relayed in the (unexpected) Directory change
- Throw error when
build_docker_simple_image Usage example
build_docker_simple_image "project"
build_docker_simple_image "project" "Dockerfile-development"
build_docker_simple_image "project" "Dockerfile-development" "project/folder/path"
build_docker_simple_image "project" "Dockerfile" "project/folder/path" "--target final"PRs
- Replace return for exit by @UlisesGascon in #22
- Rewrite git_checkout_branch by @UlisesGascon in #23
- Rewrite build_docker_simple_image by @UlisesGascon in #24
- bump to 0.4.0 by @UlisesGascon in #25
Changelog
- b57441d chore: bump to 0.4.0 by @UlisesGascon
- 1d225eb feat: rewrite
build_docker_simple_imageby @UlisesGascon - a28950b feat: rewrite
git_checkout_branchby @UlisesGascon - a334ad8 feat: replace
returnforexitby @UlisesGascon
Full Changelog: 0.3.0...0.4.0
0.3.0
What's Changed
Main Changes
- Added pipeline to the project
- Added tests and linter capabilities in a dockerized environment
- Added tests for most of the functions
- Refactored some functions to improve their usability (breaking changes)
Breaking Changes
- Rewrite
build_docker_simple_image(53d90c7)- The folder argument is optional
- The arguments order has changed
- Make folder an optional argument in
git_checkout_branch(15f13e2) - Drop function
check_secrets(ea7a103) - Add function
check_environmental_variables(ea7a103)
Understanding check_environmental_variables
This function is used as:
check_secrets "DB_USER" "DB_PASS"
In this example, check_secrets checks if the DB_USER and DB_PASS environment variables are set. If either is not set, it prints an error message and returns 1. If both are set, it prints a confirmation message for each:
"OK: DB_USER is set."
"OK: DB_PASS is set."
Migration for git_checkout_branch
Just Swap the arguments. Now the folder path is optional
Before:
git_checkout_branch opinionated-bash-scripts mainAfter:
git_checkout_branch main opinionated-bash-scriptsMigration for build_docker_simple_image
Just Swap the arguments. Now the folder path is optional
Current:
build_docker_simple_image my_image Dockerfile.test docker_folder
build_docker_simple_image my_image Dockerfile.test
build_docker_simple_image my_image PRs
- Add makefile with lint command by @UlisesGascon in #10
- Add shebang to the files by @UlisesGascon in #11
- Lint the project files by @UlisesGascon in #12
- Add pipeline to the project by @UlisesGascon in #13
- Add test infrastructure and tests cases for FS scripts by @UlisesGascon in #14
- Add tests to core logic by @UlisesGascon in #15
- Rewrite check_secrets function by @UlisesGascon in #16
- Improve Networking functions by @UlisesGascon in #17
- Improve Git functions by @UlisesGascon in #18
- Improve Docker functions feat: rewrite build_docker_simple_image by @UlisesGascon in #19
- Improve documentation by @UlisesGascon in #20
- Bump to 3.0.0 by @UlisesGascon in #21
Other Changes
- Bump to 3.0.0 (0d22234)
- Add information for local development (130ea32)
- Update example (431f180)
- Add error if URL is not provided in
git_clone_public_project(1ee7500) - Add more checks in
git_clone_private_project(153022a) - Extend compatibility for
check_local_mqtt_availabilityfunction (75d0c4f) - Improve business logic for
check_local_websockets_availability(27a72f3) - Add tests for get_version (399545f)
- Add tests for load_secrets (bb72197)
- Add tests for docker (d349d13)
- Add tests for git (1b0fb4d)
- Add tests for networking (c371494)
- Add test cases for fs file (3ac59bf)
- Extend linter to cover test files (1cd3950)
- Add test command to makefile (013210b)
- Add linter for Docker image (933bc58)
- Add tests step to the pipeline (61e85b4)
- Add a test mode that runs in a non-interactive environment (a5f8485)
- Add pipeline to the project (216b7ba)
- Lint the project files (132b392)
- Add shebang to the files (ed12b95)
- Add makefile with lint command (1272ec4)
Changelog
- 0d22234 chore: bump to 3.0.0 by @UlisesGascon
- 130ea32 docs: add information for local development by @UlisesGascon
- 431f180 docs: update example by @UlisesGascon
- 53d90c7 feat: rewrite
build_docker_simple_imageby @UlisesGascon - 1ee7500 feat: add error if URL is not provided in
git_clone_public_projectby @UlisesGascon - 153022a feat: add more checks in
git_clone_private_projectby @UlisesGascon - 15f13e2 feat: make folder optional argument in
git_checkout_branchby @UlisesGascon - 75d0c4f fix: extend compatibility for
check_local_mqtt_availabilityfunction by @UlisesGascon - 27a72f3 feat: improve business logic for
check_local_websockets_availabilityby @UlisesGascon - 668640f feat: rewrite
check_secretsby @UlisesGascon - ea7a103 chore: rename
check_secretstocheck_environmental_variablesby @UlisesGascon - 399545f test: add tests for get_version by @UlisesGascon
- bb72197 test: add tests for load_secrets by @UlisesGascon
- d349d13 test: add tests for docker by @UlisesGascon
- 1b0fb4d test: add tests for git by @UlisesGascon
- c371494 test: add tests for networking by @UlisesGascon
- 3ac59bf test: add test cases for fs file by @UlisesGascon
- 1cd3950 chore: extend linter to cover test files by @UlisesGascon
- 013210b feat: add test command to makefile by @UlisesGascon
- 933bc58 feat: add linter for Docker image by @UlisesGascon
- 61e85b4 feat: add tests step to the pipeline by @UlisesGascon
- a5f8485 feat: add a test mode that runs in a non-interactive environment by @UlisesGascon
- 216b7ba feat: add pipeline to the project by @UlisesGascon
- 132b392 chore: lint the project files by @UlisesGascon
- ed12b95 feat: add shebang to the files by @UlisesGascon
- 1272ec4 feat: add makefile with lint command by @UlisesGascon
Full Changelog: 0.2.1...0.3.0
0.2.1
What's Changed
Main Changes
- Fix typo in
version.shfile (a660038)
PRs
- Fix: minor typo by @UlisesGascon in #9
Changelog
- a660038 fix: typo by @UlisesGascon
- 7965bdc chore: bump to 0.2.1 by @UlisesGascon
Full Changelog: 0.2.0...0.2.1
0.2.0
What's Changed
Main Changes
- bump version to
0.2.0(6fa822a) - Add reference to docker image (70603bd)
- Use
returninstead ofexitas the scripts are sourced (f422ca7) - Extend
load_secretsto handle external files (80f73f5) - Add script file to handle version information (71af1ef)
PRs
- Add script file to handle version information by @UlisesGascon in #4
- Extend
load_secretsto handle external files by @UlisesGascon in #5 - Use return instate of exit as the scripts are sourced by @UlisesGascon in #6
- Add reference to docker image by @UlisesGascon in #7
- Bump to 0.2.0 by @UlisesGascon in #8
Changelog
- 6fa822a chore: bump to 0.2.0 by @UlisesGascon
- 70603bd docs: add reference to docker image by @UlisesGascon
- f422ca7 feat: use return instate of exit as the scripts are sourced by @UlisesGascon
- 80f73f5 feat: extend load_secrets to handle external files by @UlisesGascon
- 71af1ef feat: add script file to handle version information by @UlisesGascon
Full Changelog: 0.1.0...0.2.0
0.1.0
What's Changed
Main Changes
- Added basic documentation and sample
- Added scripts for docker, fs, git, networking and secrets
- Improve documentation
PRs
- Initial release by @UlisesGascon in #1
- improve documentation by @UlisesGascon in #2
Changelog
- 185badf docs: improve documentation by @UlisesGascon
- 12751db feat: add docker scripts by @UlisesGascon
- 987f444 feat: add fs scripts by @UlisesGascon
- 6c81ca8 feat: add git scripts by @UlisesGascon
- c7ac5d4 feat: add networking scripts by @UlisesGascon
- fbb0c34 feat: add secrets scripts by @UlisesGascon
- ea9fe5c docs: add basic sample by @UlisesGascon
- 6f4461b fix: add missing sample by @UlisesGascon
- c3c1f49 fix: typo in url by @UlisesGascon
- 40a5e97 docs: improve the example by @UlisesGascon
- ab94d69 fix: remove redundant emoji by @UlisesGascon
New Contributors
- @UlisesGascon made their first contribution in #1
Full Changelog: https://github.com/UlisesGascon/opinionated-bash-scripts/commits/0.1.0