[FIX] script install_production: ignore HEAD when checkout tag
- Install with ERPLIBRE_VERSION from env_var.sh
This commit is contained in:
parent
a73039155e
commit
af7d5c7a3a
2 changed files with 7 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ cd ERPLibre
|
||||||
### 2. Modify the parameters
|
### 2. Modify the parameters
|
||||||
|
|
||||||
Modify the file env_var.sh for production installation. Enable nginx if you need a proxy with `EL_INSTALL_NGINX` at
|
Modify the file env_var.sh for production installation. Enable nginx if you need a proxy with `EL_INSTALL_NGINX` at
|
||||||
True. Redirect your DNS to the proxy's ip and add your A and AAAA into `WL_WEBSITE_NAME` with space between.
|
True. Redirect your DNS to the proxy's ip and add your A and AAAA into `EL_WEBSITE_NAME` with space between.
|
||||||
|
|
||||||
### 3. Execute the scripts:
|
### 3. Execute the scripts:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,12 @@ sudo chown -R ${EL_USER}:${EL_USER} ${EL_HOME}
|
||||||
echo -e "\n==== Clone this installation ===="
|
echo -e "\n==== Clone this installation ===="
|
||||||
REMOTE_URL_GIT=`git remote get-url origin`
|
REMOTE_URL_GIT=`git remote get-url origin`
|
||||||
BRANCH_GIT=`git rev-parse --abbrev-ref HEAD`
|
BRANCH_GIT=`git rev-parse --abbrev-ref HEAD`
|
||||||
sudo su ${EL_USER} -c "git clone --branch ${BRANCH_GIT} ${REMOTE_URL_GIT} ${EL_HOME_ERPLIBRE}"
|
if [ "HEAD" = "${BRANCH_GIT}" ]; then
|
||||||
|
# Checkout version of env_var.sh
|
||||||
|
sudo su ${EL_USER} -c "git clone --branch v${ERPLIBRE_VERSION} ${REMOTE_URL_GIT} ${EL_HOME_ERPLIBRE}"
|
||||||
|
else
|
||||||
|
sudo su ${EL_USER} -c "git clone --branch ${BRANCH_GIT} ${REMOTE_URL_GIT} ${EL_HOME_ERPLIBRE}"
|
||||||
|
fi
|
||||||
sudo cp ./env_var.sh ${EL_HOME_ERPLIBRE}
|
sudo cp ./env_var.sh ${EL_HOME_ERPLIBRE}
|
||||||
sudo chown -R ${EL_USER}:${EL_USER} ${EL_HOME_ERPLIBRE}/env_var.sh
|
sudo chown -R ${EL_USER}:${EL_USER} ${EL_HOME_ERPLIBRE}/env_var.sh
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue