Added Hash Generation

This commit is contained in:
Sohrab Behdani 2024-11-23 14:22:20 +03:30
parent a776ad4a95
commit 4237588d3a

View file

@ -5,7 +5,7 @@ stages:
image: archlinux/archlinux:base-devel
variables:
Desktop: "cosmic"
Desktop: "plasma"
build_iso:
stage: build
@ -15,7 +15,6 @@ build_iso:
- mv out/*.iso out/ParchLinux-$Desktop-latest.iso
- echo "Generating MD5 checksum"
- md5sum out/ParchLinux-$Desktop-latest.iso > out/md5sum.txt
- bash -c 'echo "Build Date: $(date +"%Y-%m-%d")" >> out/md5sum.txt'
- echo "Build completed. Files generated:"
- ls -lh out/
artifacts:
@ -33,7 +32,7 @@ deploy_iso:
- echo "Installing sshpass and rsync"
- pacman -Syu --noconfirm sshpass rsync
- echo "Determining the remote directory based on the tag"
- bash -c '[[ "$CI_COMMIT_TAG" == *"beta"* ]] && export REMOTE_DIR="/srv/http/beta/$Desktop/" || export REMOTE_DIR="/srv/http/$Desktop"'
- if [[ "$CI_COMMIT_TAG" == *"beta"* ]]; then export REMOTE_DIR="/srv/http/beta/$Desktop/"; else export REMOTE_DIR="/srv/http/$Desktop/"; fi
- echo "Removing old ISO files from remote directory"
- sshpass -p "$PASS" ssh -o StrictHostKeyChecking=no parch@$SSH_ROOT rm -rf "$REMOTE_DIR/"
- echo "Creating new directory on remote host"