Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update release script #311

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added changelogs/fragments/.gitkeep
Empty file.
3 changes: 3 additions & 0 deletions changelogs/fragments/update_prepare_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- Updated release script for servicenow collection.
15 changes: 13 additions & 2 deletions scripts/prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,27 @@
regexp: "^version: "
line: "version: {{ version }}"

- name: Install antsibull-docs
ansible.builtin.pip:
name: antsibull-docs

- name: Update documentation
ansible.builtin.command: 'collection_prep_add_docs -p {{ playbook_dir }}/..'
ansible.builtin.command: 'antsibull-docs collection-plugins servicenow.itsm --dest-dir {{ playbook_dir }}/../docs --use-current --output-format simplified-rst --fqcn-plugin-names'

- name: Refresh the changelog
ansible.builtin.command: 'antsibull-changelog release --verbose --version {{ version }}'

- name: Find the yaml file
find:
paths: "{{ playbook_dir }}/../changelogs/fragments"
excludes: ".gitkeep,"
register: files_to_delete

- name: Clean up the changelog fragments
ansible.builtin.file:
path: "{{ playbook_dir }}/../changelogs/fragments"
path: "{{ item.path }}"
state: absent
with_items: "{{ files_to_delete.files }}"

- name: Add everything
ansible.builtin.command: git add --all
Expand Down
Loading