1 ###############################################################################
2 # Copyright (c) 2016 Ericsson
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Eclipse Public License v1.0
6 # which accompanies this distribution, and is available at
7 # http://www.eclipse.org/legal/epl-v10.html
8 ###############################################################################
10 #args: filename oldversion newversion
12 #Update pom.xml version. For example
14 # <artifactId>org.eclipse.tracecompass</artifactId>
15 # <groupId>org.eclipse.tracecompass</groupId>
16 #- <version>2.0.0-SNAPSHOT</version>
17 #+ <version>2.0.1-SNAPSHOT</version>
21 fileContent
= open(sys
.argv
[1]).read()
22 fileContent
= re
.sub("<version>" + sys
.argv
[2] + "-SNAPSHOT</version>(\n\s+</parent>)", "<version>" + sys
.argv
[3] + "-SNAPSHOT</version>\g<1>", fileContent
)
23 open(sys
.argv
[1], "w").write(fileContent
)
This page took 0.045998 seconds and 5 git commands to generate.