File tree Expand file tree Collapse file tree 3 files changed +34
-12
lines changed Expand file tree Collapse file tree 3 files changed +34
-12
lines changed Original file line number Diff line number Diff line change 6767 {% - do golang .environ .append ('export PATH=${PATH}:%s/go/bin' |format (golang .pkg .archive .name )) %}
6868{% - endif %}
6969
70- {#- Depreciated parameter 'golang.dir' % }
70+ {#- Depreciated parameter 'golang.dir' # }
7171{% - if 'dir' in golang and golang .dir and golang .kernel == 'linux' %}
7272{% - do golang .linux .update ({'dir' : golang .dir }) %}
7373{% - endif %}
Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
22# vim: ft=sls
33
4- {# - Get the `tplroot` from `tpldir` #}
54{%- set tplroot = tpldir.split(' /' )[0 ] %}
65{%- set sls_config_clean = tplroot ~ ' .config.clean' %}
6+ {%- set sls_repo_clean = ' .repo.clean' %}
77{%- from tplroot ~ " /map.jinja" import golang with context % }
88
99include:
1010 - {{ sls_config_clean }}
11+ {%- if grains.kernel| lower == ' linux' % }
12+ - {{ sls_repo_clean }}
1113
12- {%- if golang.pkg.use_upstream_repo % }
13- include:
14- - .repo.clean
15- {%- endif % }
16-
17- golang- package- clean- pkg- removed:
14+ golang- package- clean- pkg- cleaned:
1815 pkg.removed:
1916 - name: {{ golang.pkg.name }}
2017 - require:
2118 - sls: {{ sls_config_clean }}
19+ - sls: {{ sls_repo_clean }}
20+
21+ {%- elif grains.os_family == ' MacOS' % }
22+
23+ golang- package- clean- cmd- run- brew:
24+ cmd.run:
25+ - name: brew uninstall -- force {{ golang.pkg.name }}
26+ - runas: {{ golang.rootuser }}
27+ - onlyif: test - x / usr/ local/ bin / brew
28+ - require:
29+ - sls: {{ sls_config_clean }}
30+
31+ {%- endif % }
Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
22# vim: ft=sls
33
4- {# - Get the `tplroot` from `tpldir` #}
54{%- set tplroot = tpldir.split(' /' )[0 ] %}
5+ {%- set sls_repo_install = ' .repo' %}
66{%- from tplroot ~ " /map.jinja" import golang with context % }
77
8- {%- if golang.pkg.use_upstream_repo % }
8+ {%- if grains.kernel | lower == ' linux ' % }
99include:
10- - .repo
11- {%- endif % }
10+ - {{ sls_repo_install }}
1211
1312golang- package- install- pkg- installed:
1413 pkg.installed:
1514 - name: {{ golang.pkg.name }}
15+ - reload_modules: true
16+ - require:
17+ - sls: {{ sls_repo_install }}
18+
19+ {%- elif grains.os_family == ' MacOS' % }
20+
21+ golang- package- install- cmd- run- brew:
22+ cmd.run:
23+ - name: brew install {{ golang.pkg.name }}
24+ - runas: {{ golang.rootuser }}
25+ - onlyif: test - x / usr/ local/ bin / brew
26+
27+ {%- endif % }
You can’t perform that action at this time.
0 commit comments