From 596faad56abc20319bbe710fe1eb724a2122bf2e Mon Sep 17 00:00:00 2001 From: Marc Aschmann Date: Thu, 12 Nov 2015 17:13:38 +0000 Subject: [PATCH] Fixes #31 - Also reworked includes --- CHANGELOG.md | 8 ++++++- tasks/{facts.yml => 00-facts.yml} | 0 tasks/{config.yml => 10-config.yml} | 2 +- tasks/{composer.yml => 20-composer.yml} | 0 tasks/{cache.yml => 30-cache.yml} | 0 tasks/{assets.yml => 40-assets.yml} | 0 tasks/{migrations.yml => 50-migrations.yml} | 0 ...ean_releases.yml => 60-clean_releases.yml} | 0 tasks/main.yml | 22 +++++++++---------- 9 files changed, 19 insertions(+), 13 deletions(-) rename tasks/{facts.yml => 00-facts.yml} (100%) rename tasks/{config.yml => 10-config.yml} (82%) rename tasks/{composer.yml => 20-composer.yml} (100%) rename tasks/{cache.yml => 30-cache.yml} (100%) rename tasks/{assets.yml => 40-assets.yml} (100%) rename tasks/{migrations.yml => 50-migrations.yml} (100%) rename tasks/{clean_releases.yml => 60-clean_releases.yml} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index a35632e47..f5b347fae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog -## v2.0 +## v2.0.1-alpha + +* bugfixes for parameters file +* bugfix for migrations (@vviippola) +* renamed includes to mirror their order + +## v2.0.0-alpha reworked and more flexible configuration * creates release version in a file per release diff --git a/tasks/facts.yml b/tasks/00-facts.yml similarity index 100% rename from tasks/facts.yml rename to tasks/00-facts.yml diff --git a/tasks/config.yml b/tasks/10-config.yml similarity index 82% rename from tasks/config.yml rename to tasks/10-config.yml index dcd916d6b..89aafeba4 100644 --- a/tasks/config.yml +++ b/tasks/10-config.yml @@ -12,5 +12,5 @@ register: symfony_parameters - name: Create symlink for parameters file from shared directory. - file: state=link src={{symfony_project_root}}/shared/app/config/{{symfony_project_parameters_file}} path={{symfony_current_release_dir}}/app/config/{{symfony_project_parameters_file}} creates={{symfony_current_release_dir}}/app/config/{{symfony_project_parameters_file}} + file: state=link src={{symfony_project_root}}/shared/app/config/{{symfony_project_parameters_file}} path={{symfony_current_release_dir}}/app/config/{{symfony_project_parameters_file}} when: symfony_parameters.stat.exists \ No newline at end of file diff --git a/tasks/composer.yml b/tasks/20-composer.yml similarity index 100% rename from tasks/composer.yml rename to tasks/20-composer.yml diff --git a/tasks/cache.yml b/tasks/30-cache.yml similarity index 100% rename from tasks/cache.yml rename to tasks/30-cache.yml diff --git a/tasks/assets.yml b/tasks/40-assets.yml similarity index 100% rename from tasks/assets.yml rename to tasks/40-assets.yml diff --git a/tasks/migrations.yml b/tasks/50-migrations.yml similarity index 100% rename from tasks/migrations.yml rename to tasks/50-migrations.yml diff --git a/tasks/clean_releases.yml b/tasks/60-clean_releases.yml similarity index 100% rename from tasks/clean_releases.yml rename to tasks/60-clean_releases.yml diff --git a/tasks/main.yml b/tasks/main.yml index ed8e9820f..8e4f4a62b 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,6 +1,6 @@ --- # tasks file for symfony2 -- include: facts.yml +- include: 00-facts.yml - name: Create/prepare necessary directories for release and shared data. file: state=directory path={{item.path}} @@ -13,6 +13,10 @@ - name: Pull sources from the repository. git: repo={{symfony_project_repo}} dest={{symfony_current_release_dir}} version={{symfony_project_branch}} accept_hostkey=yes depth={{symfony_project_git_clone_depth}} +# will be replaced with symlink +- name: Ensure logs directory is not present. + file: state=absent path="{{symfony_current_release_dir}}/app/logs" + # read project's composer.json and store output - name: Read composer.json shell: cat {{symfony_current_release_dir}}/composer.json @@ -20,26 +24,22 @@ - include: "{{ symfony_project_post_folder_creation_tasks | default('empty.yml') }}" -# will be replaced with symlink -- name: Ensure logs directory is not present. - file: state=absent path="{{symfony_current_release_dir}}/app/logs" - - name: Create symlinks to shared directories. file: state=link src="{{symfony_shared_dir}}{{item.src}}" path="{{symfony_current_release_dir}}{{item.path}}" with_items: - { src: "/app/logs", path: "/app/logs" } -- include: config.yml +- include: 10-config.yml -- include: composer.yml +- include: 20-composer.yml - include: "{{ symfony_project_pre_cache_warmup_tasks | default('empty.yml') }}" -- include: cache.yml +- include: 30-cache.yml -- include: assets.yml +- include: 40-assets.yml -- include: migrations.yml +- include: 50-migrations.yml - name: create release file copy: content="{{symfony_current_release}}" dest="{{symfony_current_release_dir}}/RELEASE" mode=644 @@ -51,4 +51,4 @@ - include: "{{ symfony_project_post_live_switch_tasks | default('empty.yml') }}" -- include: clean_releases.yml \ No newline at end of file +- include: 60-clean_releases.yml \ No newline at end of file