-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial commit of modified stable_driver.sh (#1433)
- Loading branch information
1 parent
a36255a
commit dcf8f9c
Showing
1 changed file
with
26 additions
and
19 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 |
---|---|---|
|
@@ -73,7 +73,7 @@ $gdasdir/ush/submodules/update_develop.sh $gdasdir | |
|
||
# ============================================================================== | ||
# email information | ||
PEOPLE="[email protected] Russ.Treadon@noaa.gov [email protected] David.New@noaa.gov" | ||
PEOPLE="[email protected]" | ||
BODY=$stableroot/$datestr/stable_nightly | ||
|
||
# ============================================================================== | ||
|
@@ -84,41 +84,48 @@ total=0 | |
if [ $ci_status -eq 0 ]; then | ||
cd $gdasdir | ||
# checkout feature/stable-nightly | ||
git stash | ||
total=$(($total+$?)) | ||
if [ $total -ne 0 ]; then | ||
##git stash | ||
rc=$? | ||
total=$(($total+$rc)) | ||
if [ $rc -ne 0 ]; then | ||
echo "Unable to git stash" >> $stableroot/$datestr/output | ||
fi | ||
git checkout feature/stable-nightly | ||
total=$(($total+$?)) | ||
if [ $total -ne 0 ]; then | ||
rc=$? | ||
total=$(($total+$rc)) | ||
if [ $rc -ne 0 ]; then | ||
echo "Unable to checkout feature/stable-nightly" >> $stableroot/$datestr/output | ||
fi | ||
# merge in develop | ||
git merge develop | ||
total=$(($total+$?)) | ||
if [ $total -ne 0 ]; then | ||
rc=$? | ||
total=$(($total+$rc)) | ||
if [ $rc -ne 0 ]; then | ||
echo "Unable to merge develop" >> $stableroot/$datestr/output | ||
fi | ||
# add in submodules | ||
git stash pop | ||
total=$(($total+$?)) | ||
if [ $total -ne 0 ]; then | ||
##git stash pop | ||
rc=$? | ||
total=$(($total+$rc)) | ||
if [ $rc -ne 0 ]; then | ||
echo "Unable to git stash pop" >> $stableroot/$datestr/output | ||
fi | ||
$my_dir/../ush/submodules/add_submodules.sh $gdasdir | ||
total=$(($total+$?)) | ||
if [ $total -ne 0 ]; then | ||
$gdasdir/ush/submodules/add_submodules.sh $gdasdir | ||
rc=$? | ||
total=$(($total+$rc)) | ||
if [ $rc -ne 0 ]; then | ||
echo "Unable to add updated submodules to commit" >> $stableroot/$datestr/output | ||
fi | ||
git diff-index --quiet HEAD || git commit -m "Update to new stable build on $datestr" | ||
total=$(($total+$?)) | ||
if [ $total -ne 0 ]; then | ||
rc=$? | ||
total=$(($total+$rc)) | ||
if [ $rc -ne 0 ]; then | ||
echo "Unable to commit" >> $stableroot/$datestr/output | ||
fi | ||
git push --set-upstream origin feature/stable-nightly | ||
total=$(($total+$?)) | ||
if [ $total -ne 0 ]; then | ||
rc=$? | ||
total=$(($total+$rc)) | ||
if [ $rc -ne 0 ]; then | ||
echo "Unable to push" >> $stableroot/$datestr/output | ||
fi | ||
if [ $total -ne 0 ]; then | ||
|
@@ -152,4 +159,4 @@ mail -r "Darth Vader - NOAA Affiliate <[email protected]>" -s "$SUBJECT" "$PE | |
|
||
# ============================================================================== | ||
# scrub working directory for older files | ||
find $stableroot/* -maxdepth 1 -mtime +3 -exec rm -rf {} \; | ||
find $stableroot/* -maxdepth 1 -mtime +1 -exec rm -rf {} \; |