exclude .min.css from being copy + include css files that don't start with theme in there name! (#52)
Reviewed-on: #52 Reviewed-by: muppeth <muppeth@no-reply@disroot.org> Co-authored-by: meaz <meaz@disroot.org> Co-committed-by: meaz <meaz@disroot.org>
This commit is contained in:
parent
4690ef208e
commit
bc971d10bb
1 changed files with 4 additions and 2 deletions
|
@ -42,8 +42,9 @@
|
|||
- name: "[THEME] - Find css files from different repos"
|
||||
find:
|
||||
paths: "{{ forgejo_theme_dir }}"
|
||||
patterns: "*.css"
|
||||
patterns: ".*(?<!\\.min)\\.css$"
|
||||
recurse: yes
|
||||
use_regex: yes
|
||||
register: css_files
|
||||
tags: theme
|
||||
|
||||
|
@ -53,6 +54,7 @@
|
|||
dest: "{{ forgejo_theme_dir }}/public/assets/css/"
|
||||
remote_src: yes
|
||||
force: yes
|
||||
mode: '0644'
|
||||
with_items: "{{ css_files.files }}"
|
||||
when: "'/public/' not in item.path"
|
||||
become: true
|
||||
|
@ -63,7 +65,7 @@
|
|||
# Lastly, update app.ini by adding the theme's name list.
|
||||
- name: "[THEME] - Get and prepare a list for app.ini of css files in public folder, register it"
|
||||
shell:
|
||||
cmd: ls "{{ forgejo_theme_dir }}/public/assets/css" | sed -e 's/theme-//g' | sed -e 's/.css//g' | paste -s -d,
|
||||
cmd: ls "{{ forgejo_theme_dir }}/public/assets/css" | awk '{ if ($0 ~ /^theme-/) { gsub(/^theme-/, "", $0) }; gsub(/.css$/, "", $0); print }' | paste -s -d,
|
||||
chdir: "{{ forgejo_theme_dir }}"
|
||||
register: theme_name
|
||||
tags: theme
|
||||
|
|
Loading…
Reference in a new issue