Skip to content
Merged
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
6 changes: 4 additions & 2 deletions .github/workflows/gitlab-lts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ jobs:
git clone https://isis-codebuild-ci:$GITLAB_TOKEN@code.usgs.gov/astrogeology/isis-codebuild-ci.git
echo $LTS_VERSION
cd isis-codebuild-ci
if [[ "git ls-remote --exit-code origin $LTS_VERSION" == 2 ]]; then
if [[ $(git ls-remote --heads origin $LTS_VERSION | wc -l) -eq 0 ]]; then
echo "Branch $LTS_VERSION does not exist, will create"
git checkout -b $LTS_VERSION
else
echo "Branch $LTS_VERSION already exists"
git checkout $LTS_VERSION
git reset --hard origin/main
fi
echo -e "\nenv: \n shell: bash \n variables: \n LTS_VERSION: $LTS_VERSION \n BASE_LTS: $BASE_LTS \n ANACONDA_API_TOKEN: $ANACONDA_TOKEN \n GITHUB_SHA: $GITHUB_SHA" >> buildspec-lts.yml
git commit -a -m "$LTS_VERSION"
git push origin $LTS_VERSION --force
git push origin $LTS_VERSION --force