]> git.immae.eu Git - github/wallabag/wallabag.git/blob - scripts/update.sh
Added require.sh to check if composer is installed
[github/wallabag/wallabag.git] / scripts / update.sh
1 #! /usr/bin/env bash
2 # You can execute this file to update wallabag
3 # eg: `sh update.sh prod`
4
5 DIR="${BASH_SOURCE%/*}"
6 if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
7 . "$DIR/require.sh"
8
9 ENV=$1
10 TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
11
12 rm -rf var/cache/*
13 git fetch origin
14 git fetch --tags
15 git checkout $TAG --force
16 SYMFONY_ENV=$ENV composer install --no-dev -o --prefer-dist
17 php bin/console cache:clear --env=$ENV