More portable script, minor tweaks to website task path

This commit is contained in:
Gabriel Simmer 2023-04-25 16:17:52 +01:00
parent e0203ef763
commit 54581895e7
Signed by: arch
GPG key ID: C81B106D46C5B875
2 changed files with 4 additions and 3 deletions

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Get the list of changed paths in the latest commit
changed_paths=$(git diff-tree --no-commit-id --name-only -r HEAD)

View file

@ -11,10 +11,11 @@ tasks:
cd osc-triggers/website
export CHANGED_FILES=$(../.builds/changed-paths.sh)
if [[ $CHANGED_FILES == "website" || $CHANGED_FILES == "all" ]]; then
tar -cvz . > ../../site.tar.gz
tar -cvz . > ../site.tar.gz
fi
- upload: |
export CHANGED_FILES=$(./osc-triggers/.builds/changed-paths.sh)
cd osc-triggers
export CHANGED_FILES=$(./.builds/changed-paths.sh)
if [[ $CHANGED_FILES == "website" || $CHANGED_FILES == "all" ]]; then
hut pages publish -d $site site.tar.gz
fi