@@ -38,54 +38,17 @@ tasks:
3838 prompt : " Updating headers may break things, so check result afterwards. Really update headers?"
3939 desc : " Update headers in GitHub Actions templates"
4040 cmds :
41- - |
42- for f in $(find github/workflows/ -name '*.yaml'); do
43- echo "$f"
44- # If file starts with `# ` …
45- if [[ $(head --lines=1 "$f") =~ "^# " ]]; then
46- # … replace the header.
47- # This is done by deleting all lines from the top of the file to a blank line.
48- docker run --rm --volume=$PWD:/app --user ${COMPOSE_USER:-deploy} itkdev/php8.4-fpm:latest sed -i '1,/^$/d' "$f"
49- fi
50-
51- # Write header and file into temporary file.
52- (
53- echo "# Do not edit this file! Make a pull request on changing"
54- echo "# $f in"
55- echo "# https://github.com/itk-dev/devops_itkdev-docker if need be."
56- echo ""
57- cat "$f"
58- ) > "$f.tmp"
59- # Replace original file with temporary file.
60- mv "$f.tmp" "$f"
61- done
41+ - task : run-script
42+ vars :
43+ SCRIPT : template-headers-update
6244
6345 config-headers:update :
6446 prompt : " Updating headers may break things, so check result afterwards. Really update headers?"
6547 desc : " Update headers in tool config"
6648 cmds :
67- - ' echo TODO: implement {{.TASK}}'
68- # - |
69- # for f in $(find config -type f); do
70- # echo "$f"
71- # # # If file starts with `# ` …
72- # # if [[ $(head --lines=1 "$f") =~ "^# " ]]; then
73- # # # … replace the header.
74- # # # This is done by deleting all lines from the top of the file to a blank line.
75- # # docker run --rm --volume=$PWD:/app --user ${COMPOSE_USER:-deploy} itkdev/php8.4-fpm:latest sed -i '1,/^$/d' "$f"
76- # # fi
77-
78- # # Write header and file into temporary file.
79- # (
80- # echo "# This file is copied from $f in https://github.com/itk-dev/devops_itkdev-docker."
81- # echo "#"
82- # echo "# Feel free to edit the file, but consider making a pull request if you find a general issue with the file."
83- # echo ""
84- # cat "$f"
85- # ) > "$f.tmp"
86- # # Replace original file with temporary file.
87- # mv "$f.tmp" "$f"
88- # done
49+ - task : run-script
50+ vars :
51+ SCRIPT : config-headers-update
8952
9053 link :
9154 desc : " Set up symlinks"
0 commit comments