use python to replace bash

This commit is contained in:
zhangyibo.114514
2024-09-29 18:51:46 +08:00
parent fc9c03128e
commit 9b93a2880b

View File

@@ -12,7 +12,6 @@ jobs:
- name: Build PKG
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
pkg install -y gmake npm wget pkgconf git go122 portsnap ffmpeg p5-Image-ExifTool libheif vips bsddialog portconfig
mkdir -p /var/db/portsnap && portsnap --interactive auto > /dev/null
@@ -21,7 +20,7 @@ jobs:
run: |
git config --global --add safe.directory /home/runner/work/photoprism-freebsd-port/photoprism-freebsd-port
make package
bash -c "for file in work/pkg/*.pkg;do mv $file ${file//\.pkg/-FreeBSD-$(uname -r).pkg}; done"
python3 -c "import glob, os; [os.rename(f, f.replace('.pkg', '-FreeBSD-' + os.uname().release + '.pkg')) for f in glob.glob('work/pkg/*.pkg')]"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
@@ -36,7 +35,6 @@ jobs:
- name: Build PKG
uses: vmactions/freebsd-vm@v1
with:
usesh: true
release: "13.3"
prepare: |
pkg install -y gmake npm wget pkgconf git go122 ffmpeg p5-Image-ExifTool libheif vips bsddialog portconfig
@@ -46,7 +44,7 @@ jobs:
run: |
git config --global --add safe.directory /home/runner/work/photoprism-freebsd-port/photoprism-freebsd-port
make package
bash -c "for file in work/pkg/*.pkg;do mv $file ${file//\.pkg/-FreeBSD-$(uname -r).pkg}; done"
python3 -c "import glob, os; [os.rename(f, f.replace('.pkg', '-FreeBSD-' + os.uname().release + '.pkg')) for f in glob.glob('work/pkg/*.pkg')]"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with: