Skip to content

Commit

Permalink
update snapshot-pc workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kevlahnota committed Oct 21, 2024
1 parent 13f0cda commit 5305050
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/snapshots-pc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,22 @@ jobs:
mv /home/runner/.m2/repository/forge/forge-installer/*/*.bz2 izpack/
cd izpack
d=$(date +%m.%d)
# rename installer
outj="$(basename -s .jar *)"
mv "${outj}.jar" "${outj}-${d}.jar"
# rename archive
outb="$(basename -s .tar.bz2 *)"
mv "${outb}.tar.bz2" "${outb}-${d}.tar.bz2"
ls
# rename files
jar_file=$(find . -maxdepth 1 -type f -name '*.jar' -print -quit)
if [ -n "$jar_file" ]; then
outj="$(basename -s .jar *)"
mv "${outj}.jar" "${outj}-${d}.jar"
else
echo "No .jar files found in the specified folder."
fi
bz2_file=$(find . -maxdepth 1 -type f -name '*.bz2' -print -quit)
if [ -n "$bz2_file" ]; then
outb="$(basename -s .tar.bz2 *)"
mv "${outb}.tar.bz2" "${outb}-${d}.tar.bz2"
else
echo "No .bz2 files found in the specified folder."
fi
- name: 📂 Sync files
uses: SamKirkland/[email protected]
Expand Down

0 comments on commit 5305050

Please sign in to comment.