-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d7ef35
commit 6d5c7db
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,12 +60,14 @@ jobs: | |
git clone https://isis-codebuild-ci:[email protected]/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 |