Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Also provide source zip without binary content #1686

Merged
merged 2 commits into from
Mar 25, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 @@ -1041,6 +1041,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 @@ -124,6 +124,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