Releases: ElvisAns/Deployeur
Releases · ElvisAns/Deployeur
1.0.1
Release Notes
Version: 1.0.1
This release introduces a robust and universal solution for executing commands from the deploy.yml file, ensuring compatibility with a wide range of commands and preserving environment changes across executions. Below are the key changes and improvements:
New Features & Improvements
-
Universal Command Execution:
- The script now dynamically generates and executes a temporary script from the
deploy.ymlfile, allowing it to handle any valid shell command (e.g.,source,export,git,composer, etc.). - Environment changes (e.g., virtual environment activation) are preserved across commands, ensuring consistent behavior.
- The script now dynamically generates and executes a temporary script from the
-
Error Handling:
- Added robust error handling with
set -eto ensure the script exits immediately if any command fails. - A
rollbackfunction is called in case of failures, providing a clean way to handle errors and maintain system stability.
- Added robust error handling with
-
Portability:
- Replaced
echowithprintffor consistent handling of escape sequences (e.g.,\n) across different shells and platforms.
- Replaced
-
Cleanup:
- Temporary scripts are automatically deleted after execution, avoiding unnecessary file clutter.
Bug Fixes
- Fixed an issue where
evalcaused environment variables (e.g.,CL_VIRTUAL_ENV) to be unset, leading to errors during command execution. - Resolved ShellCheck warnings by using
printfand adding directives for non-constantsourcefiles.
How to Use
- Ensure your
deploy.ymlfile contains the necessary commands, such as:deploy: - source /path/to/virtualenv/bin/activate - git pull - composer install --optimize-autoloader --no-dev - npm install --include-dev - php artisan migrate --force - npm run build
- Run the deployment script as usual. The script will handle all commands in the correct order and preserve environment changes.
Known Issues
- None at this time.