Skip to content

Commit

Permalink
Improve linux build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Merrit committed Feb 22, 2021
1 parent bfc0bf8 commit 420ea04
Showing 1 changed file with 34 additions and 10 deletions.
44 changes: 34 additions & 10 deletions packaging/build-linux.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,41 @@
#!/bin/bash

function version_check {
echo "Did you update the version number in globals.dart, README, etc?"
while true; do
read -p "$* [y/n]: " yn
case $yn in
[Yy]*) echo "Great! Starting build.."; break;;
[Nn]*) echo "Update version first."; exit;;
esac
done
echo -e "Nyrna build script for Linux \n"

# Generic callable confirm function.
confirm() {
# call with a prompt string or use a default
read -r -p "${1:-Are you sure? [y/N]} " response
case "$response" in
[yY][eE][sS]|[yY])
true
;;
*)
false
;;
esac
}

version_check

# Confirm tests were run.
if confirm "Did you run tests? [y/N]"; then
echo
else
echo "Run tests first." && exit
fi


# Confirm version number has been updated.
if confirm "Did you update version number? [y/N]"; then
echo
else
echo "Update version number first." && exit
fi


# Build
echo -e "Starting build.. \n"


cd ..

Expand Down

0 comments on commit 420ea04

Please sign in to comment.