From 9630f87ce94aa0d000bdb60955d73949c33ba883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Bl=C3=A4cker?= Date: Mon, 5 Aug 2024 11:17:59 +0700 Subject: [PATCH] test --- .github/workflows/versionCheck.yml | 26 ++++++++++--------------- src/Facets/AllBridgeFacet_NoVersion.sol | 1 + 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/versionCheck.yml b/.github/workflows/versionCheck.yml index d517c5b58..07021cf7c 100644 --- a/.github/workflows/versionCheck.yml +++ b/.github/workflows/versionCheck.yml @@ -111,22 +111,26 @@ jobs: echo "--------------------" done <<< "$CONTRACTS" - echo "A" # If contract files are missing a version tag, this must be corrected before continuing if [[ ${#MISSING_VERSION_TAG[@]} -ne 0 ]]; then + echo "---------------------–" + echo ">>>>>>" echo "The following files are missing a version tag: ${MISSING_VERSION_TAG[*]}" echo "Please make sure that all contracts have a version tag and try to push your changes again." exit 1 fi - echo "B" + # if the version was not updated in any of the changed contracts, store the list of affected files in a tmp file if [[ ${#MISSING_VERSION_UPDATE[@]} -ne 0 ]]; then - echo "Files with version tags not updated: ${MISSING_VERSION_UPDATE[*]}" - echo -e "${MISSING_VERSION_UPDATE[*]}" > missing_version_update.txt + echo "---------------------–" + echo ">>>>>>" + echo "The following contracts have been changed but their version tags were not updated: ${MISSING_VERSION_UPDATE[*]}" + echo "Please make sure that all contracts have a version tag and try to push your changes again." + exit 1 + # echo -e "${MISSING_VERSION_UPDATE[*]}" > missing_version_update.txt fi - echo "C" - # if there are any contracts that were (correctly) updated, add them to an array (so we can check the PR title after) + # store any contracts that were correctly updated in a tmp file so we can check the PR title after for each of those if [[ ${#UPDATED_CONTRACTS[@]} -ne 0 ]]; then echo "Updated contracts and versions: ${UPDATED_CONTRACTS[*]}" UPDATED_CONTRACTS_STR=$(IFS=,; echo "${UPDATED_CONTRACTS[*]}") @@ -148,16 +152,6 @@ jobs: echo "-----------------------------------" # Read tmp files into variables - if [ -f missing_version_tag.txt ]; then - MISSING_VERSION_TAG=$(cat missing_version_tag.txt) - echo "MISSING_VERSION_TAG=$MISSING_VERSION_TAG" - fi - - if [ -f missing_version_update.txt ]; then - MISSING_VERSION_UPDATE=$(cat missing_version_update.txt) - echo "MISSING_VERSION_UPDATE=$MISSING_VERSION_UPDATE" - fi - if [ -f updated_contracts.txt ]; then UPDATED_CONTRACTS=$(cat updated_contracts.txt) echo "UPDATED_CONTRACTS=$UPDATED_CONTRACTS" diff --git a/src/Facets/AllBridgeFacet_NoVersion.sol b/src/Facets/AllBridgeFacet_NoVersion.sol index cfb93e35f..b6cb24bb2 100644 --- a/src/Facets/AllBridgeFacet_NoVersion.sol +++ b/src/Facets/AllBridgeFacet_NoVersion.sol @@ -12,6 +12,7 @@ import { LibSwap } from "../Libraries/LibSwap.sol"; /// @title Allbridge Facet /// @author Li.Finance (https://li.finance) /// @notice Provides functionality for bridging through AllBridge +/// @custom:version 2.0.0 contract AllBridgeFacet_NoVersion is ILiFi, ReentrancyGuard,