From a6a573dfeb2184094c29d4e170c54c6f65a67f8c Mon Sep 17 00:00:00 2001 From: Anthony Dumas Date: Sun, 13 Oct 2019 14:36:36 +0000 Subject: [PATCH] Ajout d'un script de deploy --- deploy.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 deploy.sh diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..dd6a8e7 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +UPSTREAM=${1:-'@{u}'} +LOCAL=$(git rev-parse @) +REMOTE=$(git rev-parse "$UPSTREAM") +BASE=$(git merge-base @ "$UPSTREAM") + +if [ $LOCAL = $BASE ]; then + git stash + git pull + npm install +fi