Skip to content

Commit 92b9fda

Browse files
author
Vladimir Kotal
authored
Merge branch 'master' into opengrok-tools-readme
2 parents de6c565 + 679de4f commit 92b9fda

File tree

3 files changed

+38
-3
lines changed

3 files changed

+38
-3
lines changed

distribution/assembly.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@
2222
<file>
2323
<source>${project.basedir}/../opengrok-tools/${project.build.directory}/dist/opengrok-tools-${project.python.package.version}.tar.gz</source>
2424
<outputDirectory>tools</outputDirectory>
25-
<destName>opengrok-tools-${project.python.package.version}.tar.gz</destName>
25+
<destName>opengrok-tools.tar.gz</destName>
26+
</file>
27+
<file>
28+
<source>${project.basedir}/../opengrok-tools/${project.build.directory}/dist/logging.properties.template</source>
29+
<outputDirectory>doc</outputDirectory>
30+
<destName>logging.properties.template</destName>
2631
</file>
2732
</files>
2833
<fileSets>

opengrok-tools/pom.xml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Portions Copyright (c) 2017-2018, Chris Fraire <[email protected]>.
9191
</configuration>
9292
</execution>
9393
<execution>
94-
<id>copy-resources-setup.py</id>
94+
<id>copy package resources</id>
9595
<phase>compile</phase>
9696
<goals>
9797
<goal>copy-resources</goal>
@@ -104,6 +104,7 @@ Portions Copyright (c) 2017-2018, Chris Fraire <[email protected]>.
104104
<includes>
105105
<include>MANIFEST.in</include>
106106
<include>README.md</include>
107+
<include>logging.properties.template</include>
107108
</includes>
108109
</resource>
109110
<!-- replace ${project.python.package.version} in setup.py -->
@@ -117,6 +118,24 @@ Portions Copyright (c) 2017-2018, Chris Fraire <[email protected]>.
117118
</resources>
118119
</configuration>
119120
</execution>
121+
<execution>
122+
<id>copy logging.properties.template to dist</id>
123+
<phase>package</phase>
124+
<goals>
125+
<goal>copy-resources</goal>
126+
</goals>
127+
<configuration>
128+
<outputDirectory>${project.build.directory}/dist</outputDirectory>
129+
<resources>
130+
<resource>
131+
<directory>${basedir}</directory>
132+
<includes>
133+
<include>logging.properties.template</include>
134+
</includes>
135+
</resource>
136+
</resources>
137+
</configuration>
138+
</execution>
120139
</executions>
121140
</plugin>
122141
<plugin>

opengrok-tools/setup.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,23 @@ def my_test_suite():
1818
return test_suite
1919

2020

21+
def get_version(version):
22+
"""
23+
Detect the mvn build versus the local python setup.py install run.
24+
:param version: the new version string to be applied
25+
:return: the mvn version, or local version number
26+
"""
27+
if 'project.python.package.version' in version:
28+
return '0.0.1local'
29+
return version
30+
31+
2132
setup(
2233
name='opengrok-tools',
2334
# The package version is taken from maven.
2435
# this "variable" is replaced by maven on the fly so don't change it here
2536
# see pom.xml for this module
26-
version='${project.python.package.version}',
37+
version=get_version('${project.python.package.version}'),
2738
packages=[
2839
'opengrok_tools',
2940
'opengrok_tools.utils',

0 commit comments

Comments
 (0)