Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions nix/mk-release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,5 @@ stdenv.mkDerivation {
chmod 0755 $collection/${what}

tar -cvzf "$out/$the_release" -C $collection/ .

# Creating the manifest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we still need the release tarball? do we do anything with that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we upload it to the CDN.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about inlining this in the CD job? i.e. move this to publish.nix, or move the content of publish.nix over here

Copy link
Contributor Author

@basvandijk basvandijk Apr 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's indeed a good idea to inline this into publish.nix.

I'll do that in: #568 (which is based on this).

manifest_file=$out/manifest.json

sha256hash=($(sha256sum "$out/$the_release")) # using this to autosplit on space
sha1hash=($(sha1sum "$out/$the_release")) # using this to autosplit on space

jo -pa \
$(jo package="${rname}" \
version="$version" \
system="${stdenv.system}" \
name="${stdenv.system}/$the_release" \
file="$out/$the_release" \
sha256hash="$sha256hash" \
sha1hash="$sha1hash") >$manifest_file

# Marking the manifest for publishing
mkdir -p $out/nix-support
echo "upload manifest $manifest_file" >> \
$out/nix-support/hydra-build-products
'';
}
31 changes: 0 additions & 31 deletions public/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -107,37 +107,6 @@ rec {
# we stamp the file with the revision
substitute "${install-sh}/install.sh" $out/install.sh \
--subst-var revision

# Creating the manifest
# We name it "_manifest.json" as opposed to "manifest.json" because we
# also export a "manifest.json" (which has nothing to do with the
# release)
hydra_manifest_file=$out/_manifest.json

sha256hashinstall=($(sha256sum "$out/install.sh")) # using this to autosplit on space
sha1hashinstall=($(sha1sum "$out/install.sh")) # using this to autosplit on space

sha256manifest=($(sha256sum "$version_manifest_file")) # using this to autosplit on space
sha1manifest=($(sha1sum "$version_manifest_file")) # using this to autosplit on space

jo -pa \
$(jo package="public" \
version="$version" \
name="installer" \
file="$out/install.sh" \
sha256hash="$sha256hashinstall" \
sha1hash="$sha1hashinstall") \
$(jo package="public" \
version="$version" \
name="manifest.json" \
file="$version_manifest_file" \
sha256hash="$sha256manifest" \
sha1hash="$sha1manifest") >$hydra_manifest_file

# Marking the manifest for publishing
mkdir -p $out/nix-support
echo "upload manifest $hydra_manifest_file" >> \
$out/nix-support/hydra-build-products
''
);
}