#!/bin/bash
# emojis help instantly recognize something went wrong and where
function exit_err() { echo "❌ ????" ; exit 1; }
set -Euo pipefail
echo "Updating your repo."
echo "☕️ Take a break - this might take a few minutes."
git stash
git co master -q
git pull origin master --ff-only -q
git fetch --prune -q
npm install || exit_err()
npm run build || exit_err()
echo "???? Done." # have a donut - everyone needs a donut sometimes
echo $'\a' # a beep in case you weren't paying attention
A git update script for a nodejs project
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.