mirror of
https://github.com/iio612/immich-native.git
synced 2026-04-16 03:21:06 +00:00
Conditionally detect Git tags and do a shallow clone
Closes: #20 Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
This commit is contained in:
@@ -8,7 +8,7 @@ This repository provides instructions and helper scripts to install [Immich](htt
|
||||
|
||||
* This guide installs Immich to `/var/lib/immich`. To change it, replace it to the directory you want in this README and `install.sh`'s `$IMMICH_PATH`.
|
||||
|
||||
* The [install.sh](install.sh) script currently is using Immich v1.117.0. It should be noted that due to the fast-evolving nature of Immich, the install script may get broken if you replace the `$TAG` to something more recent.
|
||||
* The [install.sh](install.sh) script currently is using Immich v1.117.0. It should be noted that due to the fast-evolving nature of Immich, the install script may get broken if you replace the `$REV` to something more recent.
|
||||
|
||||
* `mimalloc` is deliberately disabled as this is a native install and sharing system library makes more sense.
|
||||
|
||||
|
||||
11
install.sh
11
install.sh
@@ -2,7 +2,7 @@
|
||||
|
||||
set -xeuo pipefail
|
||||
|
||||
TAG=v1.117.0
|
||||
REV=v1.117.0
|
||||
|
||||
IMMICH_PATH=/var/lib/immich
|
||||
APP=$IMMICH_PATH/app
|
||||
@@ -41,9 +41,14 @@ mkdir -p $IMMICH_PATH/home
|
||||
echo 'umask 077' > $IMMICH_PATH/home/.bashrc
|
||||
|
||||
TMP=/tmp/immich-$(uuidgen)
|
||||
git clone https://github.com/immich-app/immich $TMP
|
||||
if [[ $REV =~ ^[0-9A-Fa-f]+$ ]]; then
|
||||
# REV is a full commit hash, full clone is required
|
||||
git clone https://github.com/immich-app/immich $TMP
|
||||
else
|
||||
git clone https://github.com/immich-app/immich $TMP --depth=1 -b $REV
|
||||
fi
|
||||
cd $TMP
|
||||
git reset --hard $TAG
|
||||
git reset --hard $REV
|
||||
rm -rf .git
|
||||
|
||||
# Use 127.0.0.1
|
||||
|
||||
Reference in New Issue
Block a user