Skip to content

Releases

0.7.0

Choose a tag to compare

@UlisesGascon UlisesGascon released this 31 Jan 10:37
185ee6b

What's Changed

Main Changes

We've added the option to use modes in load_secrets (4cfcc86).

Previous:

load_secrets
load_secrets my_file

The 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 soft

Now, 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

Changelog

Full Changelog: 0.6.1...0.7.0

0.6.1

Choose a tag to compare

@UlisesGascon UlisesGascon released this 18 Jan 12:23
ce295c1

What's Changed

Main Changes

PRs

Changelog

Full Changelog: 0.6.0...0.6.1

0.6.0

Choose a tag to compare

@UlisesGascon UlisesGascon released this 18 Jan 12:16
e017926

What's Changed

Main Changes

  • Added check_environmental_variable_value to secrets utils (f0ae653)

PRs

  • Add check_environmental_variable_value to secrets utils by @UlisesGascon in #29

Changelog

Full Changelog: 0.5.0...0.6.0

0.5.0

Choose a tag to compare

@UlisesGascon UlisesGascon released this 24 Nov 11:58
36f3a1d

What's Changed

Main Changes

  • Bump to 0.5.0 (ac3965e)
  • Added check_websockets_availability function (d0dcda3)
  • Improved error messaging for check_http_availability function (f2d4270)
  • Drop check_local_websockets_availability function (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 10

PRs

Changelog

Full Changelog: 0.4.0...0.5.0

0.4.0

Choose a tag to compare

@UlisesGascon UlisesGascon released this 24 Nov 09:10
b8fc7cc

What's Changed

Main Changes

  • Bump to 0.4.0 (b57441d)
  • Rewrite build_docker_simple_image (1d225eb)
  • Rewrite git_checkout_branch (a28950b)
  • Replace return for exit (a334ad8)

Breaking Changes

  • Replace return for exit (a334ad8)
  • This means that errors now will exit 1 the execution and not just return 1. 🔥 This can change the behaviour in your scripts.
  • Rewrite git_checkout_branch (a28950b)
    • Replaced git show-ref for git 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
  • Rewrite build_docker_simple_image (1d225eb)
    • Throw error when image_name is 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

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

Changelog

Full Changelog: 0.3.0...0.4.0

0.3.0

Choose a tag to compare

@UlisesGascon UlisesGascon released this 22 Nov 13:51
c01d9a0

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 main

After:

git_checkout_branch main opinionated-bash-scripts

Migration 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

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_availability function (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

Full Changelog: 0.2.1...0.3.0

0.2.1

Choose a tag to compare

@UlisesGascon UlisesGascon released this 21 Nov 19:45
43bb43c

What's Changed

Main Changes

  • Fix typo in version.sh file (a660038)

PRs

Changelog

Full Changelog: 0.2.0...0.2.1

0.2.0

Choose a tag to compare

@UlisesGascon UlisesGascon released this 21 Nov 17:41
e6bd571

What's Changed

Main Changes

  • bump version to 0.2.0 (6fa822a)
  • Add reference to docker image (70603bd)
  • Use return instead of exit as the scripts are sourced (f422ca7)
  • Extend load_secrets to handle external files (80f73f5)
  • Add script file to handle version information (71af1ef)

PRs

Changelog

Full Changelog: 0.1.0...0.2.0

0.1.0

Choose a tag to compare

@UlisesGascon UlisesGascon released this 21 Nov 13:56
4f293ae

What's Changed

Main Changes

  • Added basic documentation and sample
  • Added scripts for docker, fs, git, networking and secrets
  • Improve documentation

PRs

Changelog

New Contributors

Full Changelog: https://github.com/UlisesGascon/opinionated-bash-scripts/commits/0.1.0