-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathversionBumper.py
More file actions
executable file
·34 lines (28 loc) · 1.16 KB
/
versionBumper.py
File metadata and controls
executable file
·34 lines (28 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python
from xml.etree import ElementTree as et
import sys
if len(sys.argv) != 2:
print "Add Version as only argument ex: 1.0.0"
else:
newVersion = str(sys.argv[1])
print "Versions bumped to :" + newVersion
camera_controlerPath = 'src/camera_controler/package.xml'
tree = et.parse(camera_controlerPath)
tree.find('.//version').text = newVersion
tree.write(camera_controlerPath)
camera_controlerPath = 'src/camera_master_server/package.xml'
tree = et.parse(camera_controlerPath)
tree.find('.//version').text = newVersion
tree.write(camera_controlerPath)
camera_controlerPath = 'src/camera_network_msgs/package.xml'
tree = et.parse(camera_controlerPath)
tree.find('.//version').text = newVersion
tree.write(camera_controlerPath)
camera_controlerPath = 'src/gphoto_cam/package.xml'
tree = et.parse(camera_controlerPath)
tree.find('.//version').text = newVersion
tree.write(camera_controlerPath)
camera_controlerPath = 'src/picam/package.xml'
tree = et.parse(camera_controlerPath)
tree.find('.//version').text = newVersion
tree.write(camera_controlerPath)