Skip to content

Commit

Permalink
Merge pull request #1 from saltstack-formulas/rebranded
Browse files Browse the repository at this point in the history
Gogland got renamed to Goland
  • Loading branch information
noelmcloughlin committed Feb 12, 2018
2 parents 8f3e784 + 403fe2c commit 09a97ba
Show file tree
Hide file tree
Showing 16 changed files with 267 additions and 257 deletions.
6 changes: 3 additions & 3 deletions FORMULA
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: gogland
name: goland
os: gnu-linux, MacOS, Windows
os_family: RedHat, Debian, Suse, FreeBSD, Archlinux, MacOS
version: 201710
release: 1
minimum_version: 2016.3
summary: Formula for installing Jetbrains Gogland
description: Formula for installing Jetbrains Gogland IDE for GO developers
summary: Formula for installing Jetbrains Goland
description: Formula for installing Jetbrains Goland IDE for GO developers
12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
========
jetbrains-gogland
jetbrains-goland
========

Formula for latest gogland IDE from Jetbrains.
Formula for latest goland IDE from Jetbrains.

.. note::
**** THIS FORMULA IS NOT VALID YET - PENDING 1ST OFFICIAL RELEASE OF GOGLAND ****
**** THIS FORMULA IS NOT VALID YET - PENDING 1ST OFFICIAL RELEASE OF GOLAND ****

See the full `Salt Formulas installation and usage instructions
<http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.
Expand All @@ -18,7 +18,7 @@ Available states
.. contents::
:local:

``gogland``
``goland``
------------

Downloads the archive from Jetbrains website, unpacks locally and installs to the Operating System.
Expand All @@ -28,12 +28,12 @@ Downloads the archive from Jetbrains website, unpacks locally and installs to th
This formula automatically installs latest Jetbrains release. This behaviour may be overridden in pillars.


``gogland.developer``
``goland.developer``
------------
Create Desktop shortcuts. Optionally retrieve settings file from url/share and save to 'user' (pillar) home directory.


``gogland.linuxenv``
``goland.linuxenv``
------------
On Linux, the PATH is set for all system users by adding software profile to /etc/profile.d/ directory. Full support for debian linuxenv in supported Linux distributions (i.e. not Archlinux).

Expand Down
72 changes: 0 additions & 72 deletions gogland/developer.sls

This file was deleted.

95 changes: 0 additions & 95 deletions gogland/init.sls

This file was deleted.

64 changes: 0 additions & 64 deletions gogland/linuxenv.sls

This file was deleted.

12 changes: 6 additions & 6 deletions gogland/defaults.yaml → goland/defaults.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#Default Look Dictionary

gogland:
goland:
prefix: /usr/local/jetbrains
tmpdir: /tmp/jetbrainstmp
command: /bin/gogland.sh
command: /bin/goland.sh
homes: /home
osflavour: linux

jetbrains:
home: /opt/jetbrains
uri: https://data.services.jetbrains.com/products/releases?latest=true&code=
#See https://www.jetbrains.com/help/gogland/meet-gogland.html
#See https://www.jetbrains.com/help/goland/meet-goland.html
product: GO
edition:

Expand All @@ -24,15 +24,15 @@ gogland:
src_hashsum:

linux:
symlink: /usr/bin/gogland
symlink: /usr/bin/goland
#debian alternatives disabled by default. To activate, set nonzero 'altpriority' pillar.
altpriority: 0

prefs:
user:
group:
#See https://www.jetbrains.com/help/gogland/exporting-and-importing-settings.html
#See https://www.jetbrains.com/help/goland/exporting-and-importing-settings.html
jarurl:
jardir:
jarfile: gogland-settings.jar
jarfile: goland-settings.jar

72 changes: 72 additions & 0 deletions goland/developer.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{% from "goland/map.jinja" import goland with context %}
{% if goland.prefs.user %}
goland-desktop-shortcut-clean:
file.absent:
- name: '{{ goland.homes }}/{{ goland.prefs.user }}/Desktop/Goland'
- require_in:
- file: goland-desktop-shortcut-add
- onlyif: test "`uname`" = "Darwin"
goland-desktop-shortcut-add:
file.managed:
- name: /tmp/mac_shortcut.sh
- source: salt://goland/files/mac_shortcut.sh
- mode: 755
- template: jinja
- context:
user: {{ goland.prefs.user }}
homes: {{ goland.homes }}
edition: {{ goland.jetbrains.edition }}
- onlyif: test "`uname`" = "Darwin"
cmd.run:
- name: /tmp/mac_shortcut.sh {{ goland.jetbrains.edition }}
- runas: {{ goland.prefs.user }}
- require:
- file: goland-desktop-shortcut-add
- require_in:
- file: goland-desktop-shortcut-install
- onlyif: test "`uname`" = "Darwin"
goland-desktop-shortcut-install:
file.managed:
- source: salt://goland/files/goland.desktop
- name: {{ goland.homes }}/{{ goland.prefs.user }}/Desktop/goland{{ goland.jetbrains.edition }}.desktop
- makedirs: True
- user: {{ goland.prefs.user }}
{% if goland.prefs.group and grains.os not in ('MacOS',) %}
- group: {{ goland.prefs.group }}
{% endif %}
- mode: 644
- force: True
- template: jinja
- onlyif: test -f {{ goland.jetbrains.realcmd }}
- context:
home: {{ goland.jetbrains.realhome }}
command: {{ goland.command }}
{% if goland.prefs.jarurl or goland.prefs.jardir %}
goland-prefs-importfile:
file.managed:
- onlyif: test -f {{ goland.prefs.jardir }}/{{ goland.prefs.jarfile }}
- name: {{ goland.homes }}/{{ goland.prefs.user }}/{{ goland.prefs.jarfile }}
- source: {{ goland.prefs.jardir }}/{{ goland.prefs.jarfile }}
- makedirs: True
- user: {{ goland.prefs.user }}
{% if goland.prefs.group and grains.os not in ('MacOS',) %}
- group: {{ goland.prefs.group }}
{% endif %}
- if_missing: {{ goland.homes }}/{{ goland.prefs.user }}/{{ goland.prefs.jarfile }}
cmd.run:
- unless: test -f {{ goland.prefs.jardir }}/{{ goland.prefs.jarfile }}
- name: curl -o {{goland.homes}}/{{goland.prefs.user}}/{{goland.prefs.jarfile}} {{goland.prefs.jarurl}}
- runas: {{ goland.prefs.user }}
- if_missing: {{ goland.homes }}/{{ goland.prefs.user }}/{{ goland.prefs.jarfile }}
{% endif %}
{% endif %}
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 09a97ba

Please sign in to comment.