Fix release validation and packaging with latest sources
This commit is contained in:
parent
123205c97d
commit
4ad0faf307
5 changed files with 67 additions and 46 deletions
|
|
@ -10,14 +10,15 @@ export TENSAMIN_CHANNEL=$channel ELECTRON_SKIP_BINARY_DOWNLOAD=1
|
|||
export TENSAMIN_ANDROID_VERSION_CODE=${RELEASE_SEQUENCE:?Release sequence required}
|
||||
system=${3:-$(nix eval --impure --raw --expr 'builtins.currentSystem')}
|
||||
expr="import $root/scripts/release-env.nix { root = builtins.toPath \"$root\"; kind = \"packages\"; channel = \"$channel\"; system = \"$system\"; }"
|
||||
packages=$(nix build --impure --no-link --print-out-paths --expr "$expr")
|
||||
nix build --impure --no-link --expr "import $root/scripts/release-env.nix { root = builtins.toPath \"$root\"; kind = \"checks\"; system = \"$system\"; }"
|
||||
packages=$(nix build --impure --no-link --print-out-paths --expr "$expr")
|
||||
arch=$system
|
||||
arch=${arch%-linux}
|
||||
printf '%s\n' "$packages" > "$out/packages-$arch.txt"
|
||||
for name in iota iota-daemon iota-ui omikron omega client client-web mtp-sdk; do
|
||||
# Nix closures, unlike a plain copy of a Nix binary, retain runtime libraries.
|
||||
mapfile -t closure < <(nix-store --query --requisites "$packages/$name")
|
||||
package=$(realpath "$packages/$name")
|
||||
mapfile -t closure < <(nix-store --query --requisites "$package")
|
||||
nix-store --export "${closure[@]}" | gzip -n > "$out/$name-linux-$arch.nar.gz"
|
||||
done
|
||||
for binary in iota iota-daemon iota-updater; do
|
||||
|
|
@ -30,6 +31,7 @@ cp -L "$packages/omega-container" "$out/omega-image-linux-$arch.tar.gz"
|
|||
cp "$packages/iota-portable/bin/iota-release" "$out/iota-release-linux-$arch"
|
||||
cp "$packages/iota-portable/bin/iota-bundle" "$out/iota-bundle-linux-$arch"
|
||||
cp -rL "$packages/iota-bundle/share/iota" "$out/iota-contract"
|
||||
chmod -R u+w "$out/iota-contract"
|
||||
# The helpers' relative script paths are part of the Iota contract.
|
||||
mkdir -p "$out/iota-contract/iota-updater" "$out/iota-contract/iota-installer"
|
||||
mv "$out/iota-contract/artifacts.tsv" "$out/iota-contract/iota-updater/"
|
||||
|
|
@ -37,8 +39,13 @@ mv "$out/iota-contract/bundle-files.txt" "$out/iota-contract/iota-installer/"
|
|||
mkdir -p "$out/iota-contract/static"
|
||||
mv "$out/iota-contract/static-web" "$out/iota-contract/static/web"
|
||||
|
||||
work=$(mktemp -d)
|
||||
trap 'rm -rf "$work"' EXIT
|
||||
work_root=$(mktemp -d)
|
||||
trap 'rm -rf "$work_root"' EXIT
|
||||
work=$work_root/tensamin/client
|
||||
mkdir -p "$work"
|
||||
mtp_source=$(nix build --no-link --print-out-paths ".#packages.$system.mtp-source")
|
||||
cp -r "$mtp_source" "$work_root/mtp"
|
||||
chmod -R u+w "$work_root/mtp"
|
||||
source=$(nix build --no-link --print-out-paths ".#packages.$system.client-source")
|
||||
cp -r "$source/." "$work/"
|
||||
chmod -R u+w "$work"
|
||||
|
|
|
|||
Loading…
Reference in a new issue