Skip to content

Releases: ElvisAns/Deployeur

1.0.1

22 Feb 06:20

Choose a tag to compare

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

  1. Universal Command Execution:

    • The script now dynamically generates and executes a temporary script from the deploy.yml file, 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.
  2. Error Handling:

    • Added robust error handling with set -e to ensure the script exits immediately if any command fails.
    • A rollback function is called in case of failures, providing a clean way to handle errors and maintain system stability.
  3. Portability:

    • Replaced echo with printf for consistent handling of escape sequences (e.g., \n) across different shells and platforms.
  4. Cleanup:

    • Temporary scripts are automatically deleted after execution, avoiding unnecessary file clutter.

Bug Fixes

  • Fixed an issue where eval caused environment variables (e.g., CL_VIRTUAL_ENV) to be unset, leading to errors during command execution.
  • Resolved ShellCheck warnings by using printf and adding directives for non-constant source files.

How to Use

  1. Ensure your deploy.yml file 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
  2. 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.

1.0.0

22 Feb 04:31

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: https://github.com/ElvisAns/Deployeur/commits/1.0.0