From 6e8e4f6f6bf7c21e56819d011e0f8d9370bc0901 Mon Sep 17 00:00:00 2001 From: yongenaelf <132553186+yongenaelf@users.noreply.github.com> Date: Fri, 16 Feb 2024 12:47:57 +0800 Subject: [PATCH] feat: acs --- .../aelf-contract-templates/install.sh | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.devcontainer/aelf-contract-templates/install.sh b/.devcontainer/aelf-contract-templates/install.sh index f4769a2..7d8d0fd 100644 --- a/.devcontainer/aelf-contract-templates/install.sh +++ b/.devcontainer/aelf-contract-templates/install.sh @@ -6,8 +6,32 @@ echo "Activating feature 'aelf-contract-templates'" VERSION=${VERSION:-undefined} echo "The provided version is: $VERSION" +mkdir -p $HOME/LocalNuget +dotnet nuget add source $HOME/LocalNuget -n LocalNuget + +ACS_DIR=$HOME/aelf-proto/Protobuf +mkdir -p $ACS_DIR +curl -O --output-dir $ACS_DIR https://raw.githubusercontent.com/AElfProject/AElf/dev/protobuf/acs12.proto +echo "The path of acs is: $ACS_DIR" + +AELF_TOOLS_VERSION=1.0.5 +AELF_TOOLS_BRANCH=feature/acs +AELF_TOOLS_TARGET_PATH=/aelf-tools +git clone -b $AELF_TOOLS_BRANCH https://github.com/AElfProject/aelf-developer-tools.git $HOME$AELF_TOOLS_TARGET_PATH +dotnet pack -c Release -o $HOME $HOME$AELF_TOOLS_TARGET_PATH/aelf.tools/AElf.Tools -p:Version=$AELF_TOOLS_VERSION +dotnet nuget push $HOME/AElf.Tools.1.0.5.nupkg -s LocalNuget +echo "AElf.Tools 1.0.5 deployed" + +CONTRACT_TEMPLATE_VERSION=1.0.0 +CONTRACT_TEMPLATE_BRANCH=feature/acs-template +CONTRACT_TEMPLATE_TARGET_PATH=/aelf-template +git clone -b $CONTRACT_TEMPLATE_BRANCH https://github.com/AElfProject/aelf-developer-tools.git $HOME$CONTRACT_TEMPLATE_TARGET_PATH +dotnet pack -c Release -o $HOME $HOME$CONTRACT_TEMPLATE_TARGET_PATH/templates -p:Version=$CONTRACT_TEMPLATE_VERSION +dotnet nuget push $HOME/AElf.ContractTemplates.1.0.0.nupkg -s LocalNuget +echo "AElf.ContractTemplates 1.0.0 deployed" + if [ $VERSION = "latest" ]; then dotnet new --install AElf.ContractTemplates else dotnet new --install AElf.ContractTemplates::$VERSION -fi \ No newline at end of file +fi