From d36ea090eadb49ed98b17e30e2f5795b3524d353 Mon Sep 17 00:00:00 2001 From: folex <0xdxdy@gmail.com> Date: Wed, 24 Mar 2021 12:40:12 +0300 Subject: [PATCH] #!/usr/bin/env bash -o errexit -o nounset -o pipefail (#3) --- call_parameters/build.sh | 2 +- curl_template/script.air | 7 + ether-price-getter/build.sh | 2 +- fluence-cuckoo/Readme.md | 2 +- fluence-cuckoo/fce-cuckoo/build.sh | 4 +- greeting/build.sh | 2 +- ipfs-node/build.sh | 2 +- multi-service/ethqlite/build.sh | 2 +- multi-service/scripts/build.sh | 2 +- records/build.sh | 2 +- sqlite/build.sh | 2 +- url-downloader/build.sh | 2 +- url-downloader/curl_adapter/Cargo.lock | 178 ++++++++++++++++++++++++ url-downloader/deploy.sh | 2 +- url-downloader/deploy_separate.sh | 2 +- url-downloader/local_storage/Cargo.lock | 178 ++++++++++++++++++++++++ web3-examples/web3-examples/build.sh | 4 +- 17 files changed, 379 insertions(+), 16 deletions(-) create mode 100644 curl_template/script.air create mode 100644 url-downloader/curl_adapter/Cargo.lock create mode 100644 url-downloader/local_storage/Cargo.lock diff --git a/call_parameters/build.sh b/call_parameters/build.sh index e53d222..c7948fa 100755 --- a/call_parameters/build.sh +++ b/call_parameters/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash -o errexit -o nounset -o pipefail cargo update fce build --release diff --git a/curl_template/script.air b/curl_template/script.air new file mode 100644 index 0000000..123ce51 --- /dev/null +++ b/curl_template/script.air @@ -0,0 +1,7 @@ +(seq + (seq + (call relay (service "request") ["https://api.duckduckgo.com/?q=condensed%20milk&format=json"] milk) + (call relay (service "request") ["https://api.duckduckgo.com/?q=beetroot&format=json"] beetroot) + ) + (call %init_peer_id% (returnService "run") [milk.$.stdout beetroot.$.stdout]) +) diff --git a/ether-price-getter/build.sh b/ether-price-getter/build.sh index f62c92c..d53a163 100755 --- a/ether-price-getter/build.sh +++ b/ether-price-getter/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash -o errexit -o nounset -o pipefail mkdir -p artifacts diff --git a/fluence-cuckoo/Readme.md b/fluence-cuckoo/Readme.md index d4fb111..4491caf 100644 --- a/fluence-cuckoo/Readme.md +++ b/fluence-cuckoo/Readme.md @@ -33,7 +33,7 @@ and proceed to run the `build` script: Let's unpack the script: ```bash -#!/bin/sh +#!/usr/bin/env bash -o errexit -o nounset -o pipefail mkdir -p artifacts cd fce-cuckoo diff --git a/fluence-cuckoo/fce-cuckoo/build.sh b/fluence-cuckoo/fce-cuckoo/build.sh index 2bca901..392f7fb 100755 --- a/fluence-cuckoo/fce-cuckoo/build.sh +++ b/fluence-cuckoo/fce-cuckoo/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash -o errexit -o nounset -o pipefail # This script builds all subprojects and puts all created Wasm modules in one dir mkdir -p artifacts @@ -9,4 +9,4 @@ fce build --release cd .. rm -f artifacts/* -cp fce-cuckoo/target/wasm32-wasi/release/fce-cuckoo.wasm artifacts/ \ No newline at end of file +cp fce-cuckoo/target/wasm32-wasi/release/fce-cuckoo.wasm artifacts/ diff --git a/greeting/build.sh b/greeting/build.sh index f922dcc..012ed5c 100755 --- a/greeting/build.sh +++ b/greeting/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash -o errexit -o nounset -o pipefail # This script builds all subprojects and puts all created Wasm modules in one dir cargo update diff --git a/ipfs-node/build.sh b/ipfs-node/build.sh index 753020b..cc6c9a8 100755 --- a/ipfs-node/build.sh +++ b/ipfs-node/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash -o errexit -o nounset -o pipefail # This script builds all subprojects and puts all created Wasm modules in one dir cd effector diff --git a/multi-service/ethqlite/build.sh b/multi-service/ethqlite/build.sh index bfc7a1a..352d8cb 100755 --- a/multi-service/ethqlite/build.sh +++ b/multi-service/ethqlite/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash -o errexit -o nounset -o pipefail # This script builds all subprojects and puts all created Wasm modules in one dir # cargo update diff --git a/multi-service/scripts/build.sh b/multi-service/scripts/build.sh index 823b4cc..015c18f 100755 --- a/multi-service/scripts/build.sh +++ b/multi-service/scripts/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash -o errexit -o nounset -o pipefail mkdir -p artifacts diff --git a/records/build.sh b/records/build.sh index 0018c69..76fc25a 100755 --- a/records/build.sh +++ b/records/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash -o errexit -o nounset -o pipefail # This script builds all subprojects and puts all created Wasm modules in one dir cd effector diff --git a/sqlite/build.sh b/sqlite/build.sh index fc969d1..b896cbc 100755 --- a/sqlite/build.sh +++ b/sqlite/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash -o errexit -o nounset -o pipefail # This script builds all subprojects and puts all created Wasm modules in one dir cargo update diff --git a/url-downloader/build.sh b/url-downloader/build.sh index fba8560..7463269 100755 --- a/url-downloader/build.sh +++ b/url-downloader/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh -euo pipefail +#!/usr/bin/env bash -o errexit -o nounset -o pipefail # This script builds all subprojects and puts all created Wasm modules in one dir ( diff --git a/url-downloader/curl_adapter/Cargo.lock b/url-downloader/curl_adapter/Cargo.lock new file mode 100644 index 0000000..4990c32 --- /dev/null +++ b/url-downloader/curl_adapter/Cargo.lock @@ -0,0 +1,178 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "curl_adapter" +version = "0.1.0" +dependencies = [ + "fluence", + "log", +] + +[[package]] +name = "fluence" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "342831732a977f13220ecd6f25c7e6b6127af8d3794d42e3c880b05e457a0484" +dependencies = [ + "fluence-sdk-macro", + "fluence-sdk-main", +] + +[[package]] +name = "fluence-sdk-macro" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00c840552e5e58b62d4a272e3e4aabd548e1a4519df629a51d42157c7ecbe653" +dependencies = [ + "fluence-sdk-wit", +] + +[[package]] +name = "fluence-sdk-main" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f1d126f05a798c8f812fbe47a42145478ce8029e00411b04d1c5194ab368313" +dependencies = [ + "fluence-sdk-macro", + "log", + "serde", +] + +[[package]] +name = "fluence-sdk-wit" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ac71e8d48a8e2bdaccf59572dc7a8e8a1ad0de512fc452107756e37ac0bf752" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn", + "uuid", +] + +[[package]] +name = "getrandom" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "itoa" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" + +[[package]] +name = "libc" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "538c092e5586f4cdd7dd8078c4a79220e3e168880218124dcbce860f0ea938c6" + +[[package]] +name = "log" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "proc-macro2" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "quote" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "ryu" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" + +[[package]] +name = "serde" +version = "1.0.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "syn" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fd9d1e9976102a03c542daa2eff1b43f9d72306342f3f8b3ed5fb8908195d6f" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "unicode-xid" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" + +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom", +] + +[[package]] +name = "wasi" +version = "0.10.2+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" diff --git a/url-downloader/deploy.sh b/url-downloader/deploy.sh index 9b42425..71f73b9 100755 --- a/url-downloader/deploy.sh +++ b/url-downloader/deploy.sh @@ -1,4 +1,4 @@ -#!/bin/sh -euo pipefail +#!/usr/bin/env bash -o errexit -o nounset -o pipefail # build wasms ./build.sh diff --git a/url-downloader/deploy_separate.sh b/url-downloader/deploy_separate.sh index 9753639..95e045b 100755 --- a/url-downloader/deploy_separate.sh +++ b/url-downloader/deploy_separate.sh @@ -1,4 +1,4 @@ -#!/bin/sh -euo pipefail +#!/usr/bin/env bash -o errexit -o nounset -o pipefail ./build.sh diff --git a/url-downloader/local_storage/Cargo.lock b/url-downloader/local_storage/Cargo.lock new file mode 100644 index 0000000..179a920 --- /dev/null +++ b/url-downloader/local_storage/Cargo.lock @@ -0,0 +1,178 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "fluence" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "342831732a977f13220ecd6f25c7e6b6127af8d3794d42e3c880b05e457a0484" +dependencies = [ + "fluence-sdk-macro", + "fluence-sdk-main", +] + +[[package]] +name = "fluence-sdk-macro" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00c840552e5e58b62d4a272e3e4aabd548e1a4519df629a51d42157c7ecbe653" +dependencies = [ + "fluence-sdk-wit", +] + +[[package]] +name = "fluence-sdk-main" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f1d126f05a798c8f812fbe47a42145478ce8029e00411b04d1c5194ab368313" +dependencies = [ + "fluence-sdk-macro", + "log", + "serde", +] + +[[package]] +name = "fluence-sdk-wit" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ac71e8d48a8e2bdaccf59572dc7a8e8a1ad0de512fc452107756e37ac0bf752" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn", + "uuid", +] + +[[package]] +name = "getrandom" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "itoa" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" + +[[package]] +name = "libc" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "538c092e5586f4cdd7dd8078c4a79220e3e168880218124dcbce860f0ea938c6" + +[[package]] +name = "local_storage" +version = "0.1.0" +dependencies = [ + "fluence", + "log", +] + +[[package]] +name = "log" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "proc-macro2" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +dependencies = [ + "unicode-xid", +] + +[[package]] +name = "quote" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "ryu" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" + +[[package]] +name = "serde" +version = "1.0.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "syn" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fd9d1e9976102a03c542daa2eff1b43f9d72306342f3f8b3ed5fb8908195d6f" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "unicode-xid" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" + +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom", +] + +[[package]] +name = "wasi" +version = "0.10.2+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" diff --git a/web3-examples/web3-examples/build.sh b/web3-examples/web3-examples/build.sh index 1604834..7ccaa4d 100755 --- a/web3-examples/web3-examples/build.sh +++ b/web3-examples/web3-examples/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash -o errexit -o nounset -o pipefail # This script builds all subprojects and puts all created Wasm modules in one dir # cd sqlite @@ -23,4 +23,4 @@ cp curl_adapter/target/wasm32-wasi/release/curl_adapter.wasm artifacts/ cp facade/target/wasm32-wasi/release/facade.wasm artifacts/ # cp sqlite/target/wasm32-wasi/release/sqlite_test.wasm artifacts/ # wget https://github.com/fluencelabs/sqlite/releases/download/v0.9.0_w/sqlite3.wasm -# mv sqlite3.wasm artifacts/ \ No newline at end of file +# mv sqlite3.wasm artifacts/