Skip to content

Commit b5681b4

Browse files
committed
Version bump v2.2.0
1 parent 862acfd commit b5681b4

File tree

6 files changed

+62
-3
lines changed

6 files changed

+62
-3
lines changed

CHANGES.rst

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Changelog
22
=========
33

4+
2.2.0 (unreleased)
5+
------------------
6+
7+
48
2.1.0 (2022-01-05)
59
------------------
610

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from setuptools import setup
2222
from setuptools import find_packages
2323

24-
version = "2.1.0"
24+
version = "2.2.0"
2525

2626
setup(
2727
name="senaite.core",

src/senaite/core/profiles/default/metadata.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<metadata>
3-
<version>2.1.0</version>
3+
<version>2.2.0</version>
44
<dependencies>
55
<dependency>profile-Products.ATContentTypes:base</dependency>
66
<dependency>profile-Products.CMFEditions:CMFEditions</dependency>

src/senaite/core/upgrade/configure.zcml

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
44
i18n_domain="senaite.core">
55

6+
<!-- 2.1.0 to 2.2.0 -->
7+
<genericsetup:upgradeStep
8+
title="Upgrade to SENAITE.CORE 2.2.0"
9+
source="2.1.0"
10+
destination="2.2.0"
11+
handler="senaite.core.upgrade.v02_02_000.upgrade"
12+
profile="senaite.core:default"/>
13+
614
<!-- 2.0.0 to 2.1.0 -->
715
<genericsetup:upgradeStep
816
title="Upgrade to SENAITE.CORE 2.1.0"
+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# This file is part of SENAITE.CORE.
4+
#
5+
# SENAITE.CORE is free software: you can redistribute it and/or modify it under
6+
# the terms of the GNU General Public License as published by the Free Software
7+
# Foundation, version 2.
8+
#
9+
# This program is distributed in the hope that it will be useful, but WITHOUT
10+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11+
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12+
# details.
13+
#
14+
# You should have received a copy of the GNU General Public License along with
15+
# this program; if not, write to the Free Software Foundation, Inc., 51
16+
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17+
#
18+
# Copyright 2018-2021 by it's authors.
19+
# Some rights reserved, see README and LICENSE.
20+
21+
from senaite.core import logger
22+
from senaite.core.config import PROJECTNAME as product
23+
from senaite.core.upgrade import upgradestep
24+
from senaite.core.upgrade.utils import UpgradeUtils
25+
26+
version = "2.2.0" # Remember version number in metadata.xml and setup.py
27+
profile = "profile-{0}:default".format(product)
28+
29+
30+
@upgradestep(product, version)
31+
def upgrade(tool):
32+
portal = tool.aq_inner.aq_parent
33+
setup = portal.portal_setup # noqa
34+
ut = UpgradeUtils(portal)
35+
ver_from = ut.getInstalledVersion(product)
36+
37+
if ut.isOlderVersion(product, version):
38+
logger.info("Skipping upgrade of {0}: {1} > {2}".format(
39+
product, ver_from, version))
40+
return True
41+
42+
logger.info("Upgrading {0}: {1} -> {2}".format(product, ver_from, version))
43+
44+
# -------- ADD YOUR STUFF BELOW --------
45+
46+
logger.info("{0} upgraded to version {1}".format(product, version))
47+
return True

webpack/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "senaite.core",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"main": "app/senaite.core.js",
55
"scripts": {
66
"build": "mode=production webpack",

0 commit comments

Comments
 (0)