Commit 2e87be00 authored by Melroy van den Berg's avatar Melroy van den Berg

Version check added

parent 1da04e64
Pipeline #1731 passed with stages
in 2 minutes and 37 seconds
#!/bin/bash
# Deploy the tar, deb and rpm files to the WineGUI website download directory
#!/usr/bin/env bash
# By: Melroy van den Berg
# File: release.sh
# Description: Deploy the tar, deb and rpm files to the WineGUI website download directory
# TODO: Check if the version already exists
if [ -z ${APP_VERSION} ]; then
echo "ERROR: App_version env. variable is not set! Exit"
exit 1
fi
# Roll-out the new release
sshpass -e scp -o stricthostkeychecking=no ./build/WineGUI-v* melroy@server.melroy.org:/var/www/winegui.melroy.org/html/downloads
\ No newline at end of file
# Check if the version already exists
output=$(sshpass -e ssh -o StrictHostKeyChecking=no melroy@server.melroy.org 'cd /var/www/winegui.melroy.org/html/downloads; find . -name "WineGUI-${APP_VERSION}.*"')
if [[ "$output" == "" ]]; then
# Roll-out the new release
sshpass -e scp -o stricthostkeychecking=no ./build/WineGUI-v* melroy@server.melroy.org:/var/www/winegui.melroy.org/html/downloads
else
echo "INFO: Release is already rolled-out to the downloads folder."
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment