]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - scripts/update.sh
Added require.sh to check if composer is installed
[github/wallabag/wallabag.git] / scripts / update.sh
index 167e84e1f1cb4cbc0e7f04cea112ce1657e77267..96a48217f492caea1835323c116162e3bce9fd45 100644 (file)
@@ -1,4 +1,10 @@
 #! /usr/bin/env bash
+# You can execute this file to update wallabag
+# eg: `sh update.sh prod`
+
+DIR="${BASH_SOURCE%/*}"
+if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
+. "$DIR/require.sh"
 
 ENV=$1
 TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
@@ -6,6 +12,6 @@ TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
 rm -rf var/cache/*
 git fetch origin
 git fetch --tags
-git checkout $TAG
+git checkout $TAG --force
 SYMFONY_ENV=$ENV composer install --no-dev -o --prefer-dist
 php bin/console cache:clear --env=$ENV