registry/build.sh
shamsartem 633d8e6648
feat: use new aqua packages (#310)
* feat: use new aqua packages

* restore

* fix imports

* fix path

* fix

* add spell

* use new imports in test

* remove node_modules import

* fix

* move

* fix

* improve

* set marine and mrepl

* Update aqua-tests/package.json

* use --dry to check aqua is compiling
2023-12-20 18:33:42 +00:00

30 lines
784 B
Bash
Executable File

#!/usr/bin/env bash
set -o errexit -o nounset -o pipefail
# set current working directory to script directory to run script from everywhere
cd "$(dirname "$0")"
# Build the service
./service/build.sh
DISTRO_TARGET=distro/registry-service
mkdir -p "$DISTRO_TARGET"
cd ./aqua
npm pack
cd -
packed_archive_file_name_pattern="fluencelabs-registry-"
packed_archive_file_name=$(find "./aqua" -type f -name "${packed_archive_file_name_pattern}*")
cd ./aqua-tests
echo " '@fluencelabs/registry': file:../../.$packed_archive_file_name" >> "./fluence.yaml"
fluence dep npm i
fluence aqua -i ./spell/spell.aqua --no-relay --air -o "../$DISTRO_TARGET/air"
cd -
cp service/artifacts/registry.wasm service/artifacts/sqlite3.wasm distro/Config.toml "$DISTRO_TARGET"
cd distro
cargo build