Merge pull request #3645 from dokku/version-outside-dokku-root
Use version in DOKKU_LIB_ROOT
This commit is contained in:
5
Makefile
5
Makefile
@@ -108,10 +108,11 @@ addman: help2man man-db
|
|||||||
mandb
|
mandb
|
||||||
|
|
||||||
version:
|
version:
|
||||||
|
mkdir -p ${DOKKU_LIB_ROOT}
|
||||||
ifeq ($(DOKKU_VERSION),master)
|
ifeq ($(DOKKU_VERSION),master)
|
||||||
git describe --tags > ~dokku/VERSION 2>/dev/null || echo '~${DOKKU_VERSION} ($(shell date -uIminutes))' > ~dokku/VERSION
|
git describe --tags > ${DOKKU_LIB_ROOT}/VERSION 2>/dev/null || echo '~${DOKKU_VERSION} ($(shell date -uIminutes))' > ${DOKKU_LIB_ROOT}/VERSION
|
||||||
else
|
else
|
||||||
echo $(DOKKU_VERSION) > ~dokku/VERSION
|
echo $(DOKKU_VERSION) > ${DOKKU_LIB_ROOT}/STABLE_VERSION
|
||||||
endif
|
endif
|
||||||
|
|
||||||
plugin-dependencies: plugn procfile-util
|
plugin-dependencies: plugn procfile-util
|
||||||
|
|||||||
6
debian/postinst
vendored
6
debian/postinst
vendored
@@ -88,11 +88,6 @@ setup-sshcommand() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
setup-version() {
|
|
||||||
rm -f "${DOKKU_ROOT}/VERSION"
|
|
||||||
cp "${DOKKU_LIB_ROOT}/STABLE_VERSION" "${DOKKU_ROOT}/VERSION"
|
|
||||||
}
|
|
||||||
|
|
||||||
setup-dokku-installer() {
|
setup-dokku-installer() {
|
||||||
if [[ -f /etc/nginx/conf.d/dokku-installer.conf ]]; then
|
if [[ -f /etc/nginx/conf.d/dokku-installer.conf ]]; then
|
||||||
echo "Setting up dokku-installer"
|
echo "Setting up dokku-installer"
|
||||||
@@ -155,7 +150,6 @@ case "$1" in
|
|||||||
setup-storage
|
setup-storage
|
||||||
setup-plugins
|
setup-plugins
|
||||||
setup-sshcommand
|
setup-sshcommand
|
||||||
setup-version
|
|
||||||
setup-dokku-installer
|
setup-dokku-installer
|
||||||
dpkg-handling
|
dpkg-handling
|
||||||
;;
|
;;
|
||||||
|
|||||||
9
dokku
9
dokku
@@ -244,8 +244,13 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
version | -v | --version)
|
version | -v | --version)
|
||||||
test -f "$DOKKU_ROOT/VERSION" || dokku_log_fail "Unable to determine dokku's version"
|
if [[ -f "$DOKKU_LIB_ROOT/STABLE_VERSION" ]]; then
|
||||||
DOKKU_VERSION=$(cat "${DOKKU_ROOT}/VERSION")
|
DOKKU_VERSION=$(cat "${DOKKU_LIB_ROOT}/STABLE_VERSION")
|
||||||
|
elif [[ -f "$DOKKU_LIB_ROOT/VERSION" ]]; then
|
||||||
|
DOKKU_VERSION=$(cat "${DOKKU_LIB_ROOT}/VERSION")
|
||||||
|
else
|
||||||
|
dokku_log_fail "Unable to determine dokku's version"
|
||||||
|
fi
|
||||||
echo "dokku version ${DOKKU_VERSION}"
|
echo "dokku version ${DOKKU_VERSION}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
@@ -48,11 +48,6 @@ setup-sshcommand() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
setup-version() {
|
|
||||||
rm -f "${DOKKU_ROOT}/VERSION"
|
|
||||||
cp "${DOKKU_LIB_ROOT}/STABLE_VERSION" "${DOKKU_ROOT}/VERSION"
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
if [[ -r /etc/default/dokku ]]; then
|
if [[ -r /etc/default/dokku ]]; then
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
@@ -66,7 +61,6 @@ main() {
|
|||||||
setup-storage
|
setup-storage
|
||||||
setup-plugins
|
setup-plugins
|
||||||
setup-sshcommand
|
setup-sshcommand
|
||||||
setup-version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main
|
main
|
||||||
|
|||||||
Reference in New Issue
Block a user