gitea install script; rename resolvers; fix lfs

This commit is contained in:
Keiran Snowden
2023-11-27 19:44:34 -05:00
parent 5be2a914ac
commit 1f89c93f30
8 changed files with 27 additions and 10 deletions

View File

@@ -1,15 +1,13 @@
{% set ver = salt.pillar.get('gitea:version') %}
{% set url = 'https://github.com/go-gitea/gitea/releases/download/v' +
ver + '/gitea-' + ver + '-linux-amd64'
%}
{% set basepath = salt.pillar.get('gitea:path') %}
# FIXME: this could be file.managed with source_hash set
'download gitea':
cmd.run:
- name: 'wget {{ url }} -O {{ basepath }}/bin/gitea && chmod +x {{ basepath }}/bin/gitea && echo {{ ver }} > {{ basepath }}/VERSION'
- unless: grep -P '^{{ ver }}$' {{ basepath }}/VERSION
cmd.script:
- shell: /bin/bash
- source: 'salt://gitea/files/install.sh'
- runas: {{ salt.pillar.get('gitea:user') }}
- template: jinja
- unless: "{{ basepath }}/bin/gitea --version | grep 'Gitea version {{ ver }} '"
- require:
- sls: gitea.dirs