-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(devtools): consoldiate states
- Loading branch information
1 parent
acab20b
commit 4ae1c36
Showing
35 changed files
with
356 additions
and
396 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
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
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 |
---|---|---|
|
@@ -16,3 +16,4 @@ include: | |
- .server.clean | ||
- .client.clean | ||
- .devtools.clean | ||
- .devlibs.clean |
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 |
---|---|---|
|
@@ -4,4 +4,3 @@ | |
include: | ||
- .package.clean | ||
- .binary.clean | ||
- .libs.clean |
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
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
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
File renamed without changes.
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
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
|
||
{%- if grains.kernel|lower == 'linux' and grains.os_family not in ('Arch',) %} | ||
|
||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- from tplroot ~ "/map.jinja" import data as d with context %} | ||
{%- set formula = d.formula %} | ||
{%- set sls_archive_clean = tplroot ~ '.devtools.clean' %} | ||
include: | ||
- {{ sls_archive_clean }} | ||
{%- if 'wanted' in d.devtools and d.devtools.wanted %} | ||
{%- for tool in d.devtools.wanted %} | ||
{%- if tool in d.devtools and d.devtools[tool] %} | ||
{%- if d.devtools[tool]['pkg']['use_upstream_archive'] and d.linux.altpriority|int > 0 %} | ||
{%- for cmd in d.devtools[tool]['pkg']['commands'] %} | ||
{{ formula }}-devtools-{{ tool }}-archive-alternatives-clean-{{ cmd }}: | ||
alternatives.remove: | ||
- name: link-k8s-devtools-{{ tool }}-{{ cmd }} | ||
- path: {{ d.devtools[tool]['pkg']['archive']['path'] }}/{{ cmd }} | ||
- onlyif: update-alternatives --get-selections |grep ^link-k8s-devtools-{{ tool }}-{{ cmd }} | ||
- require: | ||
- sls: {{ sls_archive_clean }} | ||
{%- endfor %} | ||
{%- endif %} | ||
{%- endif %} | ||
{%- endfor %} | ||
{%- endif %} | ||
{%- endif %} |
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
|
||
{%- if grains.kernel|lower == 'linux' and grains.os_family not in ('Arch',) %} | ||
|
||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- from tplroot ~ "/map.jinja" import data as d with context %} | ||
{%- set formula = d.formula %} | ||
{%- set sls_archive_install = tplroot ~ '.devtools.install' %} | ||
include: | ||
- {{ sls_archive_install }} | ||
{%- if 'wanted' in d.devtools and d.devtools.wanted %} | ||
{%- for tool in d.devtools.wanted %} | ||
{%- if tool in d.devtools and d.devtools[tool] %} | ||
{%- if d.devtools[tool]['pkg']['use_upstream_archive'] and d.linux.altpriority|int > 0 %} | ||
{%- for cmd in d.devtools[tool]['pkg']['commands'] %} | ||
{{ formula }}-devtools-{{ tool }}-archive-alternatives-install-{{ cmd }}: | ||
alternatives.install: | ||
- unless: {{ grains.os_family in ('Suse', 'Arch') }} | ||
- name: link-k8s-devtools-{{ tool }}-{{ cmd }} | ||
- link: /usr/local/bin/{{ cmd }} | ||
- path: {{ d.devtools[tool]['pkg']['archive']['path'] }}/{{ cmd }} | ||
- priority: {{ d.linux.altpriority }} | ||
- order: 10 | ||
- require: | ||
- sls: {{ sls_archive_install }} | ||
cmd.run: | ||
- onlyif: {{ grains.os_family in ('Suse',) }} | ||
- name: update-alternatives --install /usr/local/bin/{{ cmd }} link-k8s-devtools-{{ tool }}-{{ cmd }} {{ d.devtools[tool]['pkg']['archive']['path'] }}/{{ cmd }} {{ d.linux.altpriority }} # noqa 204 | ||
{{ formula }}-devtools-{{ tool }}-archive-alternatives-set-{{ cmd }}: | ||
alternatives.set: | ||
- unless: {{ grains.os_family in ('Suse', 'Arch') }} | ||
- name: link-k8s-devtools-{{ tool }}-{{ cmd }} | ||
- path: {{ d.devtools[tool]['pkg']['archive']['path'] }}/{{ cmd }} | ||
- require: | ||
- alternatives: {{ formula }}-devtools-{{ tool }}-archive-alternatives-install-{{ cmd }} | ||
- sls: {{ sls_archive_install }} | ||
{%- endfor %} | ||
{%- endif %} | ||
{%- endif %} | ||
{%- endfor %} | ||
{%- endif %} | ||
{%- endif %} |
Oops, something went wrong.