Docs: Rename version increment guide
[appc/deployment.git] / docs / APPC Deployment Guidelines / Incrementing APPC Versions.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
20 ==========================
21
22 After a release is performed on any of the APPC repositories, the version numbers need to be incremented. 
23
24 Version Numbers
25 ===============
26
27 The version number for APPC is composed of 3 numbers. For example, "2.7.1-SNAPSHOT".
28
29 The first number stays the same. For appc/parent, the first number is a "2". For the other APPC projects, it is a "1".
30
31 The second number is the number of the ONAP release. For example, all releases done for the ONAP "Beijing" release will
32 have the same number here.
33
34 The third number is the minor version. This number is incremented by 1 for each version of APPC that we release within
35 one ONAP release. This number gets reset back to 0 when a new ONAP release begins.
36
37 The versions in the APPC repositories are always SNAPSHOT versions, since these versions are used for making daily
38 builds.
39
40 Changing Version for APPC, APPC Parent, and APPC CDT Projects
41 =============================================================
42
43 The process is the same for these three projects.
44
45 1. First, open a terminal window to your local git repository for the project you are working on.
46
47 2. Run the maven versions:set command to update the version of all pom files. Remember to include the word "SNAPSHOT"
48    after the version number:
49
50    .. code:: bash
51
52      mvn versions:set -DgenerateBackupPoms=false -DnewVersion=<the new version number>
53
54 3. Open the "version.properties" file, located in the root directory of the repository. You will see three rows with
55     numbers. Update these numbers to match your version number (you do not need to use the word SNAPSHOT here).
56
57 4. Use git to commit and push all of the changed files. You can use a commit title like
58    "Increment version to <new version>" or something similar.
59
60 Changing the Parent Version in the APPC Project to Snapshot
61 -----------------------------------------------------------
62
63 As you make changes to the appc/parent repository, you will need to update the main APPC project to use this snapshot
64 version of appc/parent, instead of the previous released version, in order to pick up changes. You can search for the
65 text "org.onap.appc.parent" in all of the pom.xml files in the APPC repository. In order to change the version, a
66 find/replace on the <version> tag can be performed.
67
68 Changing Version for APPC Deployment Project
69 ============================================
70
71 For the appc/deployment project, there are a few additional steps.
72
73 1. First, follow the steps 1 - 3 of the "Changing Version for APPC, APPC Parent, and APPC CDT Projects" section above.
74
75 2. Open the installation/appc/pom.xml file. Change the  "<appc.snapshot.version>" property to the new snapshot version
76    of the APPC project.
77
78 3. Open the cdt/pom.xml file. Change the  "<appc.snapshot.version>" property to the new snapshot version of the
79    APPC CDT project.
80
81 4. Use git to commit and push all of the changed files. You can use a commit title like
82    "Increment version to <new version>" or something similar.
83
84