Skip to content

Commit

Permalink
chore: fix ci get prev commit hash
Browse files Browse the repository at this point in the history
  • Loading branch information
tringuyenskymavis committed Aug 20, 2024
1 parent 0ab230e commit 78d9f94
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,14 @@ jobs:
with:
node-version: v16.16.0

- name: Get latest commit hash of target branch
run: echo "TARGET_COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Get previous commit hash of target branch
run: |
if git rev-parse --verify HEAD^ >/dev/null 2>&1; then
echo "TARGET_COMMIT_HASH=$(git rev-parse HEAD^)" >> $GITHUB_ENV
else
echo "TARGET_COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
echo "Warning: This is the first commit or a new branch. Using current commit as target."
fi
- name: Storage Layout Check
run: |
Expand Down
2 changes: 0 additions & 2 deletions contracts/mocks/MockBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import "../interfaces/IBridge.sol";

contract MockBridge is IBridge {
uint256 private _collisionVariable;
uint256 private _collisionVariable1;
uint256 private _collisionVariable2;

/// @dev Mapping from validator address => last block that the bridge operator is added
mapping(address => uint256) public bridgeOperatorAddedBlock;
Expand Down

0 comments on commit 78d9f94

Please sign in to comment.