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

Fix release workflow #1066

Merged
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
4 changes: 3 additions & 1 deletion .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ jobs:
run: |
CURRENT_VERSION=$(grep '^version = ' Scarb.toml | sed 's/version = "\(.*\)"/\1/')
SCARB_VERSION=$(grep 'scarb-version = ' Scarb.toml | sed 's/scarb-version = "\(.*\)"/\1/')
CAIRO_VERSION=$(grep 'cairo-version = ' Scarb.toml | sed 's/cairo-version = "\(.*\)"/\1/')
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
echo "SCARB_VERSION=$SCARB_VERSION" >> $GITHUB_ENV
echo "CAIRO_VERSION=$CAIRO_VERSION" >> $GITHUB_ENV

- name: Extract new version number
run: echo "NEW_VERSION=${GITHUB_REF#refs/heads/release-v}" >> $GITHUB_ENV
Expand All @@ -43,7 +45,7 @@ jobs:

- name: Update presets page
run: |
class_hash get --json | sed -e '1,4d' | python3 scripts/get_hashes_page.py $SCARB_VERSION \
class_hash get --json | sed -e '1,4d' | python3 scripts/get_hashes_page.py $CAIRO_VERSION \
Comment on lines -46 to +48
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

> ./docs/modules/ROOT/pages/utils/_class_hashes.adoc

- name: Auto-commit changes
Expand Down
4 changes: 2 additions & 2 deletions src/utils/structs/checkpoint.cairo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts for Cairo v0.15.0-rc.0 (utils/structs/checkpoint.cairo)

use core::integer::u32_sqrt;
use core::num::traits::Sqrt;
use openzeppelin::utils::math;
use starknet::storage_access::StorePacking;
use super::storage_array::{StorageArray, StorageArrayTrait};
Expand Down Expand Up @@ -55,7 +55,7 @@ pub impl TraceImpl of TraceTrait {
let mut high = len;

if (len > 5) {
let mid = len - u32_sqrt(len).into();
let mid = len - len.sqrt().into();
if (key < checkpoints.read_at(mid).key) {
high = mid;
} else {
Expand Down
Loading