diff --git a/.github/workflows/bifrost_sp_ecoli_workflow.yml b/.github/workflows/bifrost_sp_ecoli_workflow.yml index c3251b0..385c066 100644 --- a/.github/workflows/bifrost_sp_ecoli_workflow.yml +++ b/.github/workflows/bifrost_sp_ecoli_workflow.yml @@ -51,14 +51,13 @@ jobs: echo "Checking commit hash for the latest tag of ecoli_fbi: $LATEST_TAG_COMMIT" echo "Checking the lastest tag of ecoli_fbi: $LATEST_TAG" - echo "test 1" - - git tag - echo "test 2" - git show-ref --tags -d - # echo "test 3" - # git describe --abbrev=0 --tags - echo "test 4" - git ls-remote --tags origin + # echo "test 1" - + # git tag + # echo "test 2" + # git show-ref --tags -d + # echo "test 4" + # git ls-remote --tags origin + # i believe test 2 and 4 order tags alphabetically, not in terms of their creation date # echo $(git show-ref --tags -d | cut -f1 -d ' ' | sed 's|.*/||') # echo $(git show-ref --tags -d | cut -f2 -d ' ' | sed 's|.*/||') # echo "test 4" diff --git a/install.sh b/install.sh index b3b2d2d..5c11822 100755 --- a/install.sh +++ b/install.sh @@ -68,13 +68,22 @@ git submodule update --init --recursive cd bifrost_sp_ecoli/ecoli_fbi || exit # Fetch the latest changes from the remote repository -git fetch origin +git fetch origin --tags git checkout main # or the specific branch you want to track -git pull origin main +git pull origin main --tags -# Optionally, echo the latest commit SHA +# Show the new commit hash after the update LATEST_COMMIT=$(git rev-parse HEAD) -echo "Updated ecoli_fbi to latest commit: $LATEST_COMMIT" +echo "Updated commit hash of ecoli_fbi after update: $LATEST_COMMIT" + +# print the latest tag of ecoli_fbi +LATEST_TAG_COMMIT=$(git tag --sort=-creatordate --format '%(objectname)'|head -1) +LATEST_TAG=$(git tag --sort=-creatordate|head -1) + +echo "Checking commit hash for the latest tag of ecoli_fbi: $LATEST_TAG_COMMIT" +echo "Checking the lastest tag of ecoli_fbi: $LATEST_TAG" + +git checkout $LATEST_TAG_COMMIT # Navigate back to the main project directory cd ../../