Feat: add a script to script/bump_mri_versions
[releng/builder.git] / scripts / bump_mri_versions / readme.md
1 # Copyright (c) 2023 PANTHEON.tech s.r.o. All rights reserved.
2 #
3 # This program and the accompanying materials are made available under the
4 # terms of the Eclipse Public License v1.0 which accompanies this distribution,
5 # and is available at http://www.eclipse.org/legal/epl-v10.html
6
7
8 # Bumping MRI versions tool
9 This program is making versions changes in pom.xml files. For example 10.0.1 to 10.0.2
10 The change will aply only if groupId.text contain "org.opendaylight".
11
12 This program is also making changes in feature.xml files. For example [0.16,1) to [0.17,1)
13
14
15 ## Installing
16
17 *Prerequisite:*  The followings are required for building test:
18
19 - Python 3.8+
20
21 GET THE CODE:
22
23 USING HTTPS:
24     git clone "https://git.opendaylight.org/gerrit/releng/builder"
25
26 USING SSH:
27     git clone "ssh://{USERNAME}@git.opendaylight.org:29418/releng/builder"
28
29 NAVIGATE TO:
30     cd ~/builder/scripts/bump_mri_versions
31
32 INSTALL VIRTUAL ENVIROMENT PACKAGE:
33     sudo apt install python3-virtualenv
34
35 CREATE NEW VIRTUAL ENVIROMENT:
36     virtualenv venv
37
38 ACTIVATE VIRTUAL ENVIROMENT:
39     . venv/bin/activate
40
41 INSTALL LIBRARIES:
42     pip install requests bs4 lxml
43
44 SET FOLDER FOR TESTING:
45     clone repo for version updating in ~/builder/scripts/bump_mri_versions/repos or
46         update "bumping_dir" variable in python_lib.py file
47
48
49 ## Running
50
51 RUN: python main.py
52
53 ## Logs
54
55 PRINT:
56     Every change will be printed out to the console.
57
58     examples here:
59
60     XML FILE: repos/aaa/features/odl-aaa-api/pom.xml
61     ('groupId:', 'org.opendaylight.mdsal', 'ARTIFACT ID:', 'odl-mdsal-binding-base', 'VERSION:', '11.0.1', 'NEW VERSION:', '11.0.2')
62     ****************************************************************************************************
63
64     XML FILE: repos/ovsdb/southbound/southbound-features/odl-ovsdb-southbound-impl/src/main/feature/feature.xml
65     ('path:', PosixPath('repos/ovsdb/southbound/southbound-features/odl-ovsdb-southbound-impl/src/main/feature/feature.xml'), 'VERSION:', '[4,5)', 'NEW VERSION:', '[5,6)')
66     ****************************************************************************************************