Skip to content

Commit

Permalink
Merge pull request #15 from yongenaelf/feature/acs-1
Browse files Browse the repository at this point in the history
feat: import acs into template
  • Loading branch information
ymlalf authored Feb 19, 2024
2 parents 9a196e0 + 6e8e4f6 commit ede6c14
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .devcontainer/aelf-contract-templates/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
fi

0 comments on commit ede6c14

Please sign in to comment.