Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: tweak scripts #94

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release-artifacts-on-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
$GITHUB_WORKSPACE/scripts/build_release.sh
tar -zcvf cosmwasm-artifacts.tar.gz artifacts
- name: Get Artifacts Versions
run: $GITHUB_WORKSPACE/scripts/get_artifacts_versions.sh > artifact_versions.txt
run: $GITHUB_WORKSPACE/scripts/get_artifacts_versions.sh --skip-verbose > artifact_versions.txt
- name: Create Release
uses: softprops/action-gh-release@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ optimize:

# Prints the artifacts versions on the current commit.
get-artifacts-versions:
scripts/get_artifacts_versions.sh
scripts/get_artifacts_versions.sh --skip-verbose

# Prints the artifacts size. Optimize should be called before.
get-artifacts-size:
Expand Down
4 changes: 2 additions & 2 deletions scripts/deployment/deploy_env/mainnets/mantra.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export CHAIN_ID="mantra-hongbai-1"
export CHAIN_ID="mantra-1"
export DENOM="uom"
export BINARY="mantrachaind"
export RPC="https://rpc.hongbai.mantrachain.io:443"
export RPC="https://rpc.mantrachain.io:443"
19 changes: 14 additions & 5 deletions scripts/get_artifacts_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,25 @@ set -e

project_root_path=$(realpath "$0" | sed 's|\(.*\)/.*|\1|' | cd ../ | pwd)

echo -e "\nGetting artifacts versions...\n"
echo -e "Contracts::\n"
if [ "$1" != "--skip-verbose" ]; then
echo -e "\nGetting artifacts versions...\n"
fi

echo -e "\033[1mContracts:\033[0m"
for artifact in artifacts/*.wasm; do
artifact="${artifact%-*}"
artifact=$(echo $artifact | sed 's/_/-/g')
contract_path=$(find "$project_root_path" -iname $(cut -d . -f 1 <<<$(basename $artifact)) -type d)
version=$(cat ''"$contract_path"'/Cargo.toml' | awk -F= '/^version/ { print $2 }')
version="${version//\"/}"

printf "%-25s %s\n" "$(basename $artifact)" ": $version"
printf "%-20s %s\n" "$(basename $artifact)" ": $version"
done
echo -e "\nPackages::\n"
echo -e "\n\033[1mPackages:\033[0m"

for package in packages/*; do
version=$(cat ''"$package"'/Cargo.toml' | awk -F= '/^version/ { print $2 }')
version="${version//\"/}"

echo -e "\n"
printf "%-20s %s\n" "$(basename $package)" ": $version"
done
Loading