forked from jackscott/golang-formula
-
Notifications
You must be signed in to change notification settings - Fork 18
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
1 parent
1b12b49
commit 8a9b380
Showing
3 changed files
with
34 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,31 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
|
||
{#- Get the `tplroot` from `tpldir` #} | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set sls_config_clean = tplroot ~ '.config.clean' %} | ||
{%- set sls_repo_clean = '.repo.clean' %} | ||
{%- from tplroot ~ "/map.jinja" import golang with context %} | ||
include: | ||
- {{ sls_config_clean }} | ||
{%- if grains.kernel|lower == 'linux' %} | ||
- {{ sls_repo_clean }} | ||
{%- if golang.pkg.use_upstream_repo %} | ||
include: | ||
- .repo.clean | ||
{%- endif %} | ||
golang-package-clean-pkg-removed: | ||
golang-package-clean-pkg-cleaned: | ||
pkg.removed: | ||
- name: {{ golang.pkg.name }} | ||
- require: | ||
- sls: {{ sls_config_clean }} | ||
- sls: {{ sls_repo_clean }} | ||
{%- elif grains.os_family == 'MacOS' %} | ||
golang-package-clean-cmd-run-brew: | ||
cmd.run: | ||
- name: brew uninstall --force {{ golang.pkg.name }} | ||
- runas: {{ golang.rootuser }} | ||
- onlyif: test -x /usr/local/bin/brew | ||
- require: | ||
- sls: {{ sls_config_clean }} | ||
{%- endif %} |
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,15 +1,27 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
|
||
{#- Get the `tplroot` from `tpldir` #} | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- set sls_repo_install = '.repo' %} | ||
{%- from tplroot ~ "/map.jinja" import golang with context %} | ||
{%- if golang.pkg.use_upstream_repo %} | ||
{%- if grains.kernel|lower == 'linux' %} | ||
include: | ||
- .repo | ||
{%- endif %} | ||
- {{ sls_repo_install }} | ||
golang-package-install-pkg-installed: | ||
pkg.installed: | ||
- name: {{ golang.pkg.name }} | ||
- reload_modules: true | ||
- require: | ||
- sls: {{ sls_repo_install }} | ||
{%- elif grains.os_family == 'MacOS' %} | ||
golang-package-install-cmd-run-brew: | ||
cmd.run: | ||
- name: brew install {{ golang.pkg.name }} | ||
- runas: {{ golang.rootuser }} | ||
- onlyif: test -x /usr/local/bin/brew | ||
{%- endif %} |