Skip to content

Commit ac993b7

Browse files
committed
hyperlane-agent.version
1 parent 6d8f925 commit ac993b7

File tree

4 files changed

+11
-46
lines changed

4 files changed

+11
-46
lines changed

.github/workflows/rust-release.yml

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ jobs:
7373
id: check_version
7474
working-directory: ./rust/main
7575
run: |
76-
# Get current version from Cargo.toml
77-
CURRENT_VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
76+
# Get current version from hyperlane-agents.version file
77+
CURRENT_VERSION=$(cat hyperlane-agents.version | tr -d '[:space:]')
7878
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
79-
echo "Current Cargo.toml version: $CURRENT_VERSION"
79+
echo "Current hyperlane-agents.version: $CURRENT_VERSION"
8080
8181
# Get latest agents-v* tag
8282
LATEST_TAG=$(git tag -l "agents-v*" --sort=-version:refname | grep -E "^agents-v[0-9]+\.[0-9]+\.[0-9]+$" | head -1)
@@ -200,32 +200,15 @@ jobs:
200200
echo "$CHANGELOG"
201201
echo 'EOF'
202202
} >> $GITHUB_OUTPUT
203-
- name: Update Cargo.toml version
204-
working-directory: ./rust/main
205-
env:
206-
NEW_VERSION: ${{ steps.next_version.outputs.new_version }}
207-
run: |
208-
# Update only the workspace version (first occurrence under [workspace.package])
209-
# Use awk to only replace the version in the [workspace.package] section
210-
awk -v new_ver="$NEW_VERSION" '
211-
/^\[workspace\.package\]/ { in_workspace=1 }
212-
/^\[/ && !/^\[workspace\.package\]/ { in_workspace=0 }
213-
in_workspace && /^version = / && !replaced {
214-
print "version = \"" new_ver "\""
215-
replaced=1
216-
next
217-
}
218-
{ print }
219-
' Cargo.toml > Cargo.toml.tmp
220-
mv Cargo.toml.tmp Cargo.toml
221-
222-
echo "Updated Cargo.toml to version $NEW_VERSION"
223-
git diff Cargo.toml
224-
- name: Update CHANGELOG
203+
- name: Update version files
225204
working-directory: ./rust/main
226205
env:
227206
NEW_VERSION: ${{ steps.next_version.outputs.new_version }}
228207
run: |
208+
# Update hyperlane-agents.version file
209+
echo "$NEW_VERSION" > hyperlane-agents.version
210+
echo "Updated hyperlane-agents.version to $NEW_VERSION"
211+
229212
# Prepend new version to CHANGELOG.md
230213
if [ -f CHANGELOG.md ]; then
231214
CURRENT_CHANGELOG=$(cat CHANGELOG.md)
@@ -260,7 +243,7 @@ jobs:
260243
git checkout -B "$BRANCH_NAME"
261244
262245
# Stage changes
263-
git add rust/main/Cargo.toml rust/main/CHANGELOG.md
246+
git add rust/main/CHANGELOG.md rust/main/hyperlane-agents.version
264247
265248
# Commit changes
266249
git commit -m "release: agents v${NEW_VERSION}

rust/main/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ edition = "2021"
3333
homepage = "https://hyperlane.xyz"
3434
license-file = "../LICENSE.md"
3535
publish = false
36-
version = "1.5.0"
36+
version = "0.1.0"
3737

3838
[workspace.dependencies]
3939
Inflector = "0.11.4"

rust/main/hyperlane-agents.version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.5.0

rust/main/release-plz.toml

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)