-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} |