Docs: New versioning guide
[appc/deployment.git] / docs / APPC Deployment Guidelines / APPC Version Increment.rst
1 .. ============LICENSE_START==========================================
2 .. ===================================================================
3 .. Copyright © 2020 AT&T Intellectual Property. All rights reserved.
4 .. ===================================================================
5 .. Licensed under the Creative Commons License, Attribution 4.0 Intl.  (the "License");
6 .. you may not use this documentation except in compliance with the License.
7 .. You may obtain a copy of the License at
8 .. 
9 ..  https://creativecommons.org/licenses/by/4.0/
10 .. 
11 .. Unless required by applicable law or agreed to in writing, software
12 .. distributed under the License is distributed on an "AS IS" BASIS,
13 .. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 .. See the License for the specific language governing permissions and
15 .. limitations under the License.
16 .. ============LICENSE_END============================================
17
18 ========================================
19 Incrementing APPC Versions After Release
20 ========================================
21
22 Version Numbers
23 ===============
24
25 The version number for APPC is composed of 3 numbers. For example, "2.7.1-SNAPSHOT".
26
27 The first number stays the same. For appc/parent, the first number is a "2". For the other APPC projects, it is a "1".
28
29 The second number is the number of the ONAP release. For example, all releases done for the ONAP "Beijing" release will
30 have the same number here.
31
32 The third number is the minor version. This number is incremented by 1 for each version of APPC that we release within
33 one ONAP release. This number gets reset back to 0 when a new ONAP release begins.
34
35 The versions in the APPC repositories are always SNAPSHOT versions, since these versions are used for making daily
36 builds.
37
38 Changing Version for APPC, APPC Parent, and APPC CDT Projects
39 =============================================================
40
41 The process is the same for these three projects.
42
43 1. First, open a terminal window to your local git repository for the project you are working on.
44
45 2. Run the maven versions:set command to update the version of all pom files. Remember to include the word "SNAPSHOT"
46    after the version number:
47
48    .. code:: bash
49
50      mvn versions:set -DgenerateBackupPoms=false -DnewVersion=<the new version number>
51
52 3. Open the "version.properties" file, located in the root directory of the repository. You will see three rows with
53     numbers. Update these numbers to match your version number (you do not need to use the word SNAPSHOT here).
54
55 4. Use git to commit and push all of the changed files. You can use a commit title like
56    "Increment version to <new version>" or something similar.
57
58 Changing the Parent Version in the APPC Project to Snapshot
59 -----------------------------------------------------------
60
61 As you make changes to the appc/parent repository, you will need to update the main APPC project to use this snapshot
62 version of appc/parent, instead of the previous released version, in order to pick up changes. You can search for the
63 text "org.onap.appc.parent" in all of the pom.xml files in the APPC repository. In order to change the version, a
64 find/replace on the <version> tag can be performed.
65
66 Changing Version for APPC Deployment Project
67 ============================================
68
69 For the appc/deployment project, there are a few additional steps.
70
71 1. First, follow the steps 1 - 3 of the "Changing Version for APPC, APPC Parent, and APPC CDT Projects" section above.
72
73 2. Open the installation/appc/pom.xml file. Change the  "<appc.snapshot.version>" property to the new snapshot version
74    of the APPC project.
75
76 3. Open the cdt/pom.xml file. Change the  "<appc.snapshot.version>" property to the new snapshot version of the
77    APPC CDT project.
78
79 4. Use git to commit and push all of the changed files. You can use a commit title like
80    "Increment version to <new version>" or something similar.
81
82