Move buildVersion into buildinfo.json, and drop that file from built tarballs.

This commit is contained in:
David Glasser
2013-07-16 09:14:04 -07:00
parent 5c3b769e44
commit c37ed42b80
2 changed files with 6 additions and 4 deletions

View File

@@ -60,8 +60,10 @@ do
# Create the tarball from the built package. In the tarball, the root
# directory should be $ROOTDIR, so we replace the "." with that, using
# --transform (a GNU tar extension).
"$GNUTAR" czf "$TARBALL" -C "$PACKAGE/.build" --transform 's/^\./'"$ROOTDIR"'/' .
# --transform (a GNU tar extension). Leave out the buildinfo.json file,
# which contains local paths and is only used to decide if we should rebuild
# a package from its corresponding source tree.
"$GNUTAR" czf "$TARBALL" -C "$PACKAGE/.build" --exclude buildinfo.json --transform 's/^\./'"$ROOTDIR"'/' .
# this is used in build-release.sh, which constructs the release json.
echo -n " \"$PACKAGE\": \"$PACKAGE_VERSION\"" >> "$TOPDIR/.package_manifest_chunk"

View File

@@ -1790,7 +1790,7 @@ _.extend(Package.prototype, {
if (options.onlyIfUpToDate) {
// Do we think we'll generate different contents than the tool that built
// this package?
if (mainJson.buildVersion !== exports.BUILD_VERSION)
if (buildInfoJson.builtBy !== exports.BUILD_VERSION)
return false;
if (options.buildOfPath &&
@@ -1961,7 +1961,6 @@ _.extend(Package.prototype, {
var mainJson = {
format: "unipackage-pre1",
buildVersion: exports.BUILD_VERSION,
summary: self.metadata.summary,
internal: self.metadata.internal,
slices: [],
@@ -1971,6 +1970,7 @@ _.extend(Package.prototype, {
};
var buildInfoJson = {
buildVersion: exports.BUILD_VERSION,
dependencies: { files: {}, directories: {} },
source: options.buildOfPath || undefined
};