Version management, next version is 0.3.
This commit is contained in:
parent
dbe614552a
commit
054950be54
3
NEWS
3
NEWS
@ -6,10 +6,11 @@
|
|||||||
NEWS
|
NEWS
|
||||||
------
|
------
|
||||||
|
|
||||||
0.5 - **Not released yet**
|
0.3 - **Not released yet**
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
* Evolution support
|
* Evolution support
|
||||||
|
* Version management
|
||||||
|
|
||||||
|
|
||||||
0.2 - Snowflakes
|
0.2 - Snowflakes
|
||||||
|
@ -43,6 +43,10 @@ import radicale
|
|||||||
|
|
||||||
# Get command-line options
|
# Get command-line options
|
||||||
parser = optparse.OptionParser()
|
parser = optparse.OptionParser()
|
||||||
|
parser.add_option(
|
||||||
|
"-v", "--version", action="store_true",
|
||||||
|
default=False,
|
||||||
|
help="show version and exit")
|
||||||
parser.add_option(
|
parser.add_option(
|
||||||
"-d", "--daemon", action="store_true",
|
"-d", "--daemon", action="store_true",
|
||||||
default=radicale.config.getboolean("server", "daemon"),
|
default=radicale.config.getboolean("server", "daemon"),
|
||||||
@ -76,6 +80,11 @@ for option in parser.option_list:
|
|||||||
value = getattr(options, key)
|
value = getattr(options, key)
|
||||||
radicale.config.set("server", key, value)
|
radicale.config.set("server", key, value)
|
||||||
|
|
||||||
|
# Print version and exit if the option is given
|
||||||
|
if options.version:
|
||||||
|
print(radicale.VERSION)
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
# Fork if Radicale is launched as daemon
|
# Fork if Radicale is launched as daemon
|
||||||
if options.daemon:
|
if options.daemon:
|
||||||
if os.fork():
|
if os.fork():
|
||||||
|
@ -49,6 +49,8 @@ except ImportError:
|
|||||||
from radicale import acl, config, ical, xmlutils
|
from radicale import acl, config, ical, xmlutils
|
||||||
|
|
||||||
|
|
||||||
|
VERSION = "0.3-git"
|
||||||
|
|
||||||
def _check(request, function):
|
def _check(request, function):
|
||||||
"""Check if user has sufficient rights for performing ``request``."""
|
"""Check if user has sufficient rights for performing ``request``."""
|
||||||
authorization = request.headers.get("Authorization", None)
|
authorization = request.headers.get("Authorization", None)
|
||||||
|
13
setup.py
13
setup.py
@ -38,17 +38,22 @@ For further information, please visit the `Radicale Website
|
|||||||
|
|
||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
|
|
||||||
# When the version is updated, ``version`` and ``download_url`` must be modified
|
import radicale
|
||||||
# A new section in the ``NEWS`` file must be added too
|
|
||||||
|
|
||||||
|
# When the version is updated, ``radicale.VERSION`` must be modified and
|
||||||
|
# ``download_url`` must be uncommented. A new section in the ``NEWS`` file
|
||||||
|
# must be added too.
|
||||||
setup(
|
setup(
|
||||||
name="Radicale",
|
name="Radicale",
|
||||||
version="0.5-git",
|
version=radicale.VERSION,
|
||||||
description="CalDAV Server",
|
description="CalDAV Server",
|
||||||
long_description=__doc__,
|
long_description=__doc__,
|
||||||
author="Guillaume Ayoub",
|
author="Guillaume Ayoub",
|
||||||
author_email="guillaume.ayoub@kozea.fr",
|
author_email="guillaume.ayoub@kozea.fr",
|
||||||
url="http://www.radicale.org/",
|
url="http://www.radicale.org/",
|
||||||
#download_url="http://radicale.org/src/radicale/Radicale-0.5.tar.gz",
|
#download_url="http://www.radicale.org/src/radicale/Radicale-%s.tar.gz" % \
|
||||||
|
# radicale.VERSION,
|
||||||
license="GNU GPL v3",
|
license="GNU GPL v3",
|
||||||
platforms="Any",
|
platforms="Any",
|
||||||
packages=["radicale", "radicale.acl"],
|
packages=["radicale", "radicale.acl"],
|
||||||
|
Loading…
Reference in New Issue
Block a user