Skip to content

Commit

Permalink
updated workflow to only show correct tag and ensuring installation a…
Browse files Browse the repository at this point in the history
…lso uses latest ecoli_fbi tag
  • Loading branch information
RAHenriksen committed Nov 4, 2024
1 parent 60f6f8c commit 3075b33
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/bifrost_sp_ecoli_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
17 changes: 13 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ../../
Expand Down

0 comments on commit 3075b33

Please sign in to comment.