mirror of
https://github.com/dokku/dokku.git
synced 2026-08-29 10:08:53 +02:00
Add a version command.
The git tag/revision is saved when running "make install", and can be displayed using "dokku version".
This commit is contained in:
8
Makefile
8
Makefile
@@ -2,19 +2,23 @@ SSHCOMMAND_URL ?= https://raw.github.com/progrium/sshcommand/master/sshcommand
|
||||
PLUGINHOOK_URL ?= https://s3.amazonaws.com/progrium-pluginhook/pluginhook_0.1.0_amd64.deb
|
||||
STACK_URL ?= github.com/progrium/buildstep
|
||||
PREBUILT_STACK_URL ?= https://s3.amazonaws.com/progrium-dokku/progrium_buildstep_79cf6805cf.tgz
|
||||
DOKKU_ROOT ?= /home/dokku
|
||||
|
||||
.PHONY: all install copyfiles plugins dependencies sshcommand pluginhook docker aufs stack count
|
||||
.PHONY: all install copyfiles version plugins dependencies sshcommand pluginhook docker aufs stack count
|
||||
|
||||
all:
|
||||
# Type "make install" to install.
|
||||
|
||||
install: dependencies stack copyfiles plugins
|
||||
install: dependencies stack copyfiles plugins version
|
||||
|
||||
copyfiles:
|
||||
cp dokku /usr/local/bin/dokku
|
||||
mkdir -p /var/lib/dokku/plugins
|
||||
cp -r plugins/* /var/lib/dokku/plugins
|
||||
|
||||
version:
|
||||
git describe --tags > ${DOKKU_ROOT}/VERSION
|
||||
|
||||
plugins: pluginhook docker
|
||||
dokku plugins-install
|
||||
|
||||
|
||||
@@ -66,12 +66,20 @@ case "$1" in
|
||||
fi
|
||||
;;
|
||||
|
||||
version)
|
||||
cat "$DOKKU_ROOT/VERSION" || {
|
||||
echo "Unable to determine dokku's version" 2>&1
|
||||
exit 1
|
||||
}
|
||||
;;
|
||||
|
||||
help)
|
||||
cat && cat<<EOF
|
||||
delete <app> Delete an application
|
||||
logs <app> [-t] Show the last logs for an application (-t follows)
|
||||
run <app> <cmd> Run a command in the environment of an application
|
||||
url <app> Show the URL for an application
|
||||
version Print dokku's version
|
||||
EOF
|
||||
;;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user