From 3f1bfc3d9a70dc108a1e582ea362114033b2cb54 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 31 May 2018 17:01:09 -0400 Subject: [PATCH] Add version information to Quay on startup Fixes https://jira.coreos.com/browse/QUAY-802 --- displayversion.py | 12 ++++++++++++ local-run.sh | 2 +- quay-entrypoint.sh | 17 +++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 displayversion.py diff --git a/displayversion.py b/displayversion.py new file mode 100644 index 000000000..463271059 --- /dev/null +++ b/displayversion.py @@ -0,0 +1,12 @@ +from _init import __version__, __gitrev__ + +def displayversion(): + version_string = ('Quay %s (%s)' % (__version__, __gitrev__.strip())).strip() + + print '=' * (len(version_string) + 4) + print '= ' + version_string + ' =' + print '=' * (len(version_string) + 4) + print "" + +if __name__ == "__main__": + displayversion() diff --git a/local-run.sh b/local-run.sh index b8db789d7..4f4ee7d98 100755 --- a/local-run.sh +++ b/local-run.sh @@ -6,7 +6,7 @@ cat << "EOF" \ \ \ \ / / | |__| | | |__| | / ____ \ | | \ \/ \ \/ / \_ ___/ \____/ /_/ \_\ |_| \__/ \__/ \ \__ - \___\ by CoreOS + \___\ by Red Hat Build, Store, and Distribute your Containers diff --git a/quay-entrypoint.sh b/quay-entrypoint.sh index 1e71169d5..a67c2c5eb 100755 --- a/quay-entrypoint.sh +++ b/quay-entrypoint.sh @@ -14,6 +14,23 @@ then fi +cat << "EOF" + __ __ + / \ / \ ______ _ _ __ __ __ + / /\ / /\ \ / __ \ | | | | / \ \ \ / / +/ / / / \ \ | | | | | | | | / /\ \ \ / +\ \ \ \ / / | |__| | | |__| | / ____ \ | | + \ \/ \ \/ / \_ ___/ \____/ /_/ \_\ |_| + \__/ \__/ \ \__ + \___\ by Red Hat + + Build, Store, and Distribute your Containers + + +EOF + +venv/bin/python -m displayversion + case "$MODE" in "interactive") echo "Copying $MODE files"