From 983ddfc36bc052d4101cbff6e734acde1137b099 Mon Sep 17 00:00:00 2001 From: Simon Baerlocher Date: Tue, 13 Aug 2019 12:24:11 +0200 Subject: [PATCH 1/4] add jmespath package and option changelog body_format --- before.yml | 1 + package/version.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/before.yml b/before.yml index 76ebd5a..43d7d1f 100644 --- a/before.yml +++ b/before.yml @@ -26,3 +26,4 @@ name: - docker - lxml + - jmespath diff --git a/package/version.yml b/package/version.yml index 683e305..9b35fa0 100644 --- a/package/version.yml +++ b/package/version.yml @@ -4,6 +4,7 @@ url: '{{ changelog }}' return_content: true validate_certs: false + body_format: '{{ changelog_format | default(omit) }}' register: register_changelog - name: '{{ package_id }} : load current version' From a83570ba5c643a67f042e512fa64eb3fbc0e37af Mon Sep 17 00:00:00 2001 From: Simon Baerlocher Date: Tue, 13 Aug 2019 13:57:20 +0200 Subject: [PATCH 2/4] update changelog and add option for tasks --- CHANGELOG.md | 7 +++++++ play.yml | 28 ++++++++++++++++++++++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5828e1..b2efd5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and [human-readable changelog](https://keepachangelog.com/en/1.0.0/). +## 0.2.0 + +### Added + +- add option for pre and after tasks in the .milk folder of the package +- add jmespath package and option changelog body_format + ## 0.1.1 ### Added diff --git a/play.yml b/play.yml index 140cc2d..e6b97ba 100644 --- a/play.yml +++ b/play.yml @@ -56,6 +56,22 @@ content: text register: register_package_id + - name: 'Search pretasks file' + find: + paths: '{{ register_package_directory.files[0].path }}/.milk' + recurse: true + patterns: '*pretasks*' + hidden: true + register: register_pretasks_path + + - name: 'Search aftertasks file' + find: + paths: '{{ register_package_directory.files[0].path }}/.milk' + recurse: true + patterns: '*aftertasks*' + hidden: true + register: register_aftertasks_path + - name: 'Sets search info' set_fact: path_package: '{{ register_package_directory.files[0].path }}' @@ -64,6 +80,8 @@ path_milk: '{{ register_milk_path.files[0].path }}' path_readme: '{{ register_readme_path.files[0].path }}' package_id: '{{ register_package_id.matches[0]["{http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd}id"] }}' + path_pretasks: '{{ register_pretasks_path.files[0].path | default(omit) }}' + path_aftertasks: '{{ register_aftertasks_path.files[0].path | default(omit) }}' - name: Include Playbooks Vara include_vars: @@ -75,6 +93,10 @@ include_tasks: package/version.yml - block: + - name: 'include pretasks' + include_tasks: '{{ path_pretasks }}' + when: path_pretasks is defined and path_pretasks + # File Hash - name: '{{ package_id }} : include file hash' include_tasks: package/file_hash.yml @@ -90,8 +112,6 @@ loop: '{{ searchreplace | dict2items }}' loop_control: loop_var: loop_searchreplace - tags: - - test - name: '{{ package_id }} : include nuspec' include_tasks: package/nuspec.yml @@ -107,6 +127,10 @@ volumes: - '{{ path_package }}:{{ path_package }}' + - name: 'include aftertasks' + include_tasks: '{{ path_aftertasks }}' + when: path_aftertasks is defined and path_aftertasks + - name: '{{ package_id }} : load deploy' include_tasks: deploy/{{ loop_deploy.provider }}.yml loop_control: From 191c8526a23b56120b8413a6d5d51d37a4e09ba2 Mon Sep 17 00:00:00 2001 From: Simon Baerlocher Date: Wed, 14 Aug 2019 17:43:04 +0200 Subject: [PATCH 3/4] add version prefix --- CHANGELOG.md | 1 + package/version.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2efd5a..37ebed7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and [human-readable changelog](https://keepachangelog.com/en/1.0.0/). - add option for pre and after tasks in the .milk folder of the package - add jmespath package and option changelog body_format +- add version perfix ## 0.1.1 diff --git a/package/version.yml b/package/version.yml index 9b35fa0..e2fa72a 100644 --- a/package/version.yml +++ b/package/version.yml @@ -18,7 +18,7 @@ - name: '{{ package_id }} : search version' set_fact: - available_version: "{{ version | regex_replace('-', '.') }}" + available_version: "{{ versions_prefix | default() }}{{ version | regex_replace('-', '.') }}" current_version: '{{ register_nuspec.matches[0]["{http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd}version"] }}' - block: From bc8d19b710a7a654cc45ba6b11e70771c000a579 Mon Sep 17 00:00:00 2001 From: Simon Baerlocher Date: Wed, 14 Aug 2019 20:51:01 +0200 Subject: [PATCH 4/4] fix title --- play.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/play.yml b/play.yml index e6b97ba..d25f8a6 100644 --- a/play.yml +++ b/play.yml @@ -56,7 +56,7 @@ content: text register: register_package_id - - name: 'Search pretasks file' + - name: 'Search pre-tasks file' find: paths: '{{ register_package_directory.files[0].path }}/.milk' recurse: true @@ -64,7 +64,7 @@ hidden: true register: register_pretasks_path - - name: 'Search aftertasks file' + - name: 'Search after-tasks file' find: paths: '{{ register_package_directory.files[0].path }}/.milk' recurse: true @@ -83,7 +83,7 @@ path_pretasks: '{{ register_pretasks_path.files[0].path | default(omit) }}' path_aftertasks: '{{ register_aftertasks_path.files[0].path | default(omit) }}' - - name: Include Playbooks Vara + - name: 'include .milk vars' include_vars: file: '{{ path_milk }}' @@ -93,7 +93,7 @@ include_tasks: package/version.yml - block: - - name: 'include pretasks' + - name: 'include pre-tasks' include_tasks: '{{ path_pretasks }}' when: path_pretasks is defined and path_pretasks @@ -127,7 +127,7 @@ volumes: - '{{ path_package }}:{{ path_package }}' - - name: 'include aftertasks' + - name: 'include after-tasks' include_tasks: '{{ path_aftertasks }}' when: path_aftertasks is defined and path_aftertasks