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 nsclient with renovate #2237

Merged
merged 2 commits into from
Nov 15, 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
65 changes: 36 additions & 29 deletions nsclient.sls
Original file line number Diff line number Diff line change
@@ -1,36 +1,43 @@
{%- load_yaml as versions %}
# renovate: datasource=github-releases depName=nscp packageName=mickem/nscp
- '0.5.3.4'
- '0.5.2.39'
- '0.5.2.29'
- '0.5.1.46'
- '0.5.1.45'
- '0.5.0.62'
- '0.4.4.23'
- '0.4.4.19'
- '0.4.3.143'
- '0.4.3.88'
{%- endload%}
# This is to handle the architecture
{%- if grains['cpuarch'] == 'AMD64' %}
{%- set arch_file = "x64" %}
{%- set arch_name = "x64" %}
{%- else %}
{%- set arch_file = "Win32" %}
{%- set arch_name = "x86" %}
{%- endif %}

nsclient:
{% for split_version in [
['0.5.3', '4'],
['0.5.2', '39'],
['0.5.2', '29'],
['0.5.1', '46'],
['0.5.1', '44'],
['0.5.0', '62'],
['0.4.4', '23'],
['0.4.4', '19'],
['0.4.3', '143'],
['0.4.3', '88']
] %}
{%- for version in versions %}
# This is to handle the version reported in Windows
{%- set major, minor, maint, build = version.split(".") %}
{%- if minor|int >= 5 %} # version 5 and newer has 2 dots (0.5.2039)
{%- set install_version = ".".join([major, minor, maint]) %}
{%- set install_version = "0".join([install_version, build]) %}
{%- else %} # version 4 and lower has 3 dots (0.4.4.23)
{%- set install_version = version %}
{%- endif %}

{% if split_version[0][2] > '4' %} # versions prior to 0.5.xxxx had 3 dots
{% set version = "0".join(split_version) %}
{% else %}
{% set version = ".".join(split_version) %}
{% endif %}
{% set file_version = ".".join(split_version) %}
'{{ version }}':
{% if grains['cpuarch'] == 'AMD64' %}
full_name: 'NSClient++ (x64)'
installer: 'https://github.com/mickem/nscp/releases/download/{{ file_version }}/NSCP-{{ file_version }}-x64.msi'
uninstaller: 'https://github.com/mickem/nscp/releases/download/{{ file_version }}/NSCP-{{ file_version }}-x64.msi'
{% else %}
full_name: 'NSClient++ (x86)'
installer: 'https://github.com/mickem/nscp/releases/download/{{ file_version }}/NSCP-{{ file_version }}-Win32.msi'
uninstaller: 'https://github.com/mickem/nscp/releases/download/{{ file_version }}/NSCP-{{ file_version }}-Win32.msi'
{% endif %}
'{{ install_version }}':
full_name: 'NSClient++ ({{ arch_name }})'
installer: 'https://github.com/mickem/nscp/releases/download/{{ version }}/NSCP-{{ version }}-{{ arch_file }}.msi'
uninstaller: 'https://github.com/mickem/nscp/releases/download/{{ version }}/NSCP-{{ version }}-{{ arch_file }}.msi'
install_flags: '/quiet'
uninstall_flags: '/quiet'
msiexec: True
locale: en_US
reboot: False
{% endfor %}
{%- endfor %}
16 changes: 12 additions & 4 deletions pandoc.sls
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,22 @@
- '1.17.0.2'
{%- endload%}
pandoc:
{%- for version in versions %}
{%- for version in versions %}
{%- set parts = version.split(".") %}
{%- if [parts[0], parts[1]] | map('int') | list >= [2, 2]%}
# Starting in version 2.2 "-x86_64" is added to the filename
{%- set file_name = "pandoc-" ~ version ~ "-windows-x86_64.msi" %}
{%- else %}
{%- set file_name = "pandoc-" ~ version ~ "-windows.msi" %}
{%- endif %}

'{{ version }}':
full_name: 'Pandoc {{ version }}'
installer: 'https://github.com/jgm/pandoc/releases/download/{{ version }}/pandoc-{{ version }}-windows.msi'
installer: 'https://github.com/jgm/pandoc/releases/download/{{ version }}/{{ file_name }}'
install_flags: '/qn ALLUSERS=1 /norestart'
uninstaller: 'https://github.com/jgm/pandoc/releases/download/{{ version }}/pandoc-{{ version }}-windows.msi'
uninstaller: 'https://github.com/jgm/pandoc/releases/download/{{ version }}/{{ file_name }}'
uninstall_flags: '/qn /norestart'
msiexec: True
locale: en_US
reboot: False
{%- endfor %}
{%- endfor %}
Loading