Skip to content

Commit

Permalink
build: version changes
Browse files Browse the repository at this point in the history
  • Loading branch information
crnbarr93 committed Jan 4, 2025
1 parent d0e6f89 commit 39985f7
Show file tree
Hide file tree
Showing 17 changed files with 78 additions and 22 deletions.
6 changes: 5 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
wasm = "build --release --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --example schema"
lint = "clippy --all --all-targets -- -D warnings"
lint = "clippy --all --all-targets -- -D warnings"

[release]
pre-release-commit-message = "chore: bump pre-release version"
pre-release-replace = true
30 changes: 30 additions & 0 deletions .github/workflows/release-changed-crates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release Changed Crates

on:
push:
branches: [main]

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Detect Changed Crates
run: |
chmod +x scripts/detect_changed_crates.sh
CHANGED_CRATES=$(./scripts/detect_changed_crates.sh)
echo "Changed crates: $CHANGED_CRATES"
echo "changed_crates=$CHANGED_CRATES" >> $GITHUB_ENV
- name: Install cargo-release
run: cargo install cargo-release

- name: Release Changed Crates with Pre-release Tags
run: |
for crate in ${{ env.changed_crates }}; do
echo "Releasing $crate with pre-release tag 'b'"
cd $crate
cargo release pre --pre-release b --no-publish
cd -
done
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/finance/andromeda-set-amount-splitter/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "andromeda-set-amount-splitter"
version = "1.2.0-b.1"
version = "1.2.0-beta.1"
edition = "2021"
rust-version = "1.75.0"

Expand Down
2 changes: 1 addition & 1 deletion contracts/finance/andromeda-splitter/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "andromeda-splitter"
version = "2.3.0-b.1"
version = "2.3.0-beta.1"
edition = "2021"
rust-version = "1.75.0"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "andromeda-weighted-distribution-splitter"
version = "2.1.0-b.2"
version = "2.1.0-beta.2"
edition = "2021"
rust-version = "1.75.0"

Expand Down
2 changes: 1 addition & 1 deletion contracts/math/andromeda-distance/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "andromeda-distance"
version = "0.1.0-b.1"
version = "0.1.0-beta.1"
edition = "2021"
rust-version = "1.75.0"

Expand Down
2 changes: 1 addition & 1 deletion contracts/modules/andromeda-rates/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "andromeda-rates"
version = "2.0.4-b.1"
version = "2.0.4-beta.1"
edition = "2021"
rust-version = "1.75.0"

Expand Down
2 changes: 1 addition & 1 deletion contracts/non-fungible-tokens/andromeda-auction/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "andromeda-auction"
version = "2.2.5-b.1"
version = "2.2.5-beta.1"
edition = "2021"
rust-version = "1.75.0"

Expand Down
2 changes: 1 addition & 1 deletion contracts/os/andromeda-adodb/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ fn test_publish() {
}

// Test prelease
let ado_version = ADOVersion::from_type("ado_type_with_beta").with_version("0.1.0-b.1");
let ado_version = ADOVersion::from_type("ado_type_with_beta").with_version("0.1.0-beta.1");
let code_id = 3;
let msg = ExecuteMsg::Publish {
ado_type: ado_version.get_type(),
Expand Down
2 changes: 1 addition & 1 deletion contracts/os/andromeda-kernel/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "andromeda-kernel"
version = "1.2.0-b.3"
version = "1.2.0-beta.3"
authors = ["Connor Barr <[email protected]>"]
edition = "2021"
rust-version = "1.65.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/andromeda-testing-e2e/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ andromeda-modules = { version = "2.0.0", path = "../andromeda-modules" }
andromeda-adodb = { version = "1.0.0", path = "../../contracts/os/andromeda-adodb", features = [
"testing",
] }
andromeda-kernel = { version = "1.2.0-b.1", path = "../../contracts/os/andromeda-kernel", features = [
andromeda-kernel = { version = "1.2.0-beta.1", path = "../../contracts/os/andromeda-kernel", features = [
"testing",
] }
andromeda-vfs = { version = "1.0.0", path = "../../contracts/os/andromeda-vfs", features = [
Expand Down
2 changes: 1 addition & 1 deletion packages/andromeda-testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ andromeda-modules = { version = "2.0.0", path = "../andromeda-modules" }
andromeda-adodb = { version = "1.0.0", path = "../../contracts/os/andromeda-adodb", features = [
"testing",
] }
andromeda-kernel = { version = "1.2.0-b.1", path = "../../contracts/os/andromeda-kernel", features = [
andromeda-kernel = { version = "1.2.0-beta.1", path = "../../contracts/os/andromeda-kernel", features = [
"testing",
] }
andromeda-vfs = { version = "1.0.0", path = "../../contracts/os/andromeda-vfs", features = [
Expand Down
2 changes: 1 addition & 1 deletion packages/deploy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ cw-orch = { workspace = true }
cw-orch-daemon = "0.24.2"

# OS Contracts
andromeda-kernel = { version = "1.2.0-b.1", path = "../../contracts/os/andromeda-kernel" }
andromeda-kernel = { version = "1.2.0-beta.1", path = "../../contracts/os/andromeda-kernel" }
andromeda-adodb = { version = "1.1.1", path = "../../contracts/os/andromeda-adodb" }
andromeda-vfs = { version = "1.1.1", path = "../../contracts/os/andromeda-vfs" }
andromeda-economics = { version = "1.1.1", path = "../../contracts/os/andromeda-economics" }
Expand Down
2 changes: 1 addition & 1 deletion packages/std/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "andromeda-std"
version = "1.5.0-b.3"
version = "1.5.0-beta.3"
edition = "2021"
rust-version = "1.75.0"
description = "The standard library for creating an Andromeda Digital Object"
Expand Down
22 changes: 22 additions & 0 deletions scripts/detect_changed_crates.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Script to detect crates with changes in dependencies

# Get the list of changed files
CHANGED_FILES=$(git diff --name-only HEAD^ HEAD)

# Initialize an array for crates needing a version bump
CRATES_TO_BUMP=()

# Check each changed file
for file in $CHANGED_FILES; do
if [[ "$file" == */Cargo.toml || "$file" == */Cargo.lock ]]; then
CRATE_DIR=$(dirname "$file")
if [[ ! " ${CRATES_TO_BUMP[@]} " =~ " ${CRATE_DIR} " ]]; then
CRATES_TO_BUMP+=("$CRATE_DIR")
fi
fi
done

# Output the crates that need a version bump
echo "${CRATES_TO_BUMP[@]}"
2 changes: 1 addition & 1 deletion tests-integration/tests/splitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ fn test_splitter_cross_chain_recipient() {
code_id: splitter_juno.code_id().unwrap(),
ado_type: "splitter".to_string(),
action_fees: None,
version: "2.3.0-b.1".to_string(),
version: "2.3.0-beta.1".to_string(),
publisher: None,
},
None,
Expand Down

0 comments on commit 39985f7

Please sign in to comment.