From ea46087227719f7932cb149b6868de15278d3321 Mon Sep 17 00:00:00 2001 From: Lucas Tortora Date: Wed, 18 Dec 2024 14:03:54 -0300 Subject: [PATCH] added script to download iota refs added step that calls the download-iota-refs script --- docs/site/package.json | 2 +- docs/site/scripts/get-iota-references.sh | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100755 docs/site/scripts/get-iota-references.sh diff --git a/docs/site/package.json b/docs/site/package.json index a337950be03..7263d5ad11e 100644 --- a/docs/site/package.json +++ b/docs/site/package.json @@ -8,7 +8,7 @@ "build": "docusaurus build", "generate-ts-docs": "docusaurus generate-typedoc", "generate-graphql-docs" : "docusaurus graphql-to-doc; rm '../../generated-graphql-docs/generated.md';", - "download-references": "git clean -Xdf ../content/references/iota-evm/; ./scripts/get-iota-evm-references.sh; git clean -Xdf ../content/references/iota-identity/; ./scripts/get-iota-identity-references.sh", + "download-references": "git clean -Xdf ../content/references/; ./scripts/get-iota-references.sh; git clean -Xdf ../content/references/iota-evm/; ./scripts/get-iota-evm-references.sh; git clean -Xdf ../content/references/iota-identity/; ./scripts/get-iota-identity-references.sh", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", "clear": "docusaurus clear", diff --git a/docs/site/scripts/get-iota-references.sh b/docs/site/scripts/get-iota-references.sh new file mode 100755 index 00000000000..e23bf706625 --- /dev/null +++ b/docs/site/scripts/get-iota-references.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# Create temporary directory to work in +mkdir tmp +cd tmp + +# Download and copy docs +curl -sL https://s3.eu-central-1.amazonaws.com/files.iota.org/iota-wiki/testnet/ts +cp -Rv ts ../../docs/content/references/ts-sdk/api + +curl -sL https://s3.eu-central-1.amazonaws.com/files.iota.org/iota-wiki/testnet/graphql/reference +cp -Rv graphql ../../docs/content/references/iota-api/iota-graphql + +curl -sL https://s3.eu-central-1.amazonaws.com/files.iota.org/iota-wiki/testnet/ts +cp -Rv rust ../../docs/content/references/framework + +# Return to root and cleanup +cd - +rm -rf tmp