Skip to content

Commit

Permalink
Merge pull request #1686 from rleigh-dundee/cpp-dist
Browse files Browse the repository at this point in the history
build: Also provide source zip without binary content
  • Loading branch information
sbesson committed Mar 25, 2015
2 parents f3c7bc3 + 4169a2a commit bbe8076
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ant/toplevel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ Type "ant -p" for a list of targets.
<target name="init"/>

<!-- Source release -->
<target name="release" description="zip the git release as bioformats-${release.version}.zip" depends="release-version">
<target name="release" description="zip the git release as bioformats-[dfsg-]${release.version}.zip" depends="release-version">
<mkdir dir="${artifact.dir}"/>
<exec executable="python" failonerror="true">
<arg value="${root.dir}/tools/source-archive.py"/>
Expand All @@ -1042,6 +1042,16 @@ Type "ant -p" for a list of targets.
<arg value="--bioformats-vcsdate-unix=${vcs.date_unix}"/>
<arg value="--target=${artifact.dir}"/>
</exec>
<exec executable="python" failonerror="true">
<arg value="${root.dir}/tools/source-archive.py"/>
<arg value="--release=bioformats-dfsg"/>
<arg value="--bioformats-shortversion=${release.shortversion}"/>
<arg value="--bioformats-version=${release.version}"/>
<arg value="--bioformats-vcsrevision=${vcs.revision}"/>
<arg value="--bioformats-vcsdate=${vcs.date}"/>
<arg value="--bioformats-vcsdate-unix=${vcs.date_unix}"/>
<arg value="--target=${artifact.dir}"/>
</exec>
</target>

<target name="store-version" description="store version information in a property file" depends="release-version">
Expand Down
11 changes: 11 additions & 0 deletions tools/source-archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,17 @@
os.path.basename(info.filename) == '.gitmodule' or
os.path.basename(info.filename) == '.travis.yml'):
continue
# Skip files for which we don't have source in this repository, for GPL compliance
if (options.release.endswith("-dfsg") and
(os.path.splitext(info.filename)[1] == ".jar" or
os.path.splitext(info.filename)[1] == ".dll" or
os.path.splitext(info.filename)[1] == ".dylib" or
os.path.splitext(info.filename)[1] == ".so")):
continue
if (options.release.endswith("-dfsg") and
info.filename.startswith("%s/components/xsd-fu/python/genshi" % (prefix))):
continue
print("File: %s" % (info.filename))
# Repack a single zip object; preserve the metadata
# directly via the ZipInfo object and rewrite the content
# (which unfortunately requires decompression and
Expand Down

0 comments on commit bbe8076

Please sign in to comment.