public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/microsoft/heads/main)] More fixes
@ 2021-10-07  1:20 Eugene Rozenfeld
  0 siblings, 0 replies; only message in thread
From: Eugene Rozenfeld @ 2021-10-07  1:20 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f6fac44b0c0a64f2ab871ace54e4316e19da3f16

commit f6fac44b0c0a64f2ab871ace54e4316e19da3f16
Author: Victor Tong <vitong@microsoft.com>
Date:   Wed Oct 6 14:37:57 2021 -0700

    More fixes

Diff:
---
 .github/scripts/init.sh                   |  6 ++++--
 .github/scripts/pushMergedVendorBranch.sh | 10 ++++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/.github/scripts/init.sh b/.github/scripts/init.sh
index 6d8d760ef5e..4a218b23f91 100644
--- a/.github/scripts/init.sh
+++ b/.github/scripts/init.sh
@@ -28,9 +28,11 @@ if test $? != 0; then
     echo "Adding gcc upstream remote"
     git remote add gcc git://gcc.gnu.org/git/gcc.git
 else
-    # Check to make sure the gcc remote URL is the one we're expecting
+    # Check if the URL ends with gcc.gnu.org. We don't check for a string explicitly
+    # since some devs may use ssh or other means to connect to the remote
     gccUrl="$(git config remote.gcc.url)"
-    if [[ $gccUrl != "git://gcc.gnu.org/git/gcc.git" ]]; then
+
+    if [[ "$gccUrl" != *"gcc.gnu.org/git/gcc.git" ]]; then
         echo "ERROR: gcc upstream remote was found but it's not pointing to git://gcc.gnu.org/git/gcc.git. Please delete the local gcc upstream remote before running init again"
         exit -1
     fi
diff --git a/.github/scripts/pushMergedVendorBranch.sh b/.github/scripts/pushMergedVendorBranch.sh
index 38ed145c0cd..6ba26f73e97 100644
--- a/.github/scripts/pushMergedVendorBranch.sh
+++ b/.github/scripts/pushMergedVendorBranch.sh
@@ -33,6 +33,11 @@ if test $? != 0; then
   exit -1
 fi
 
+if [[ `git status --porcelain` ]]; then
+  echo "ERROR: You have local changes in your repository. Please stash or push them to a branch before running this script"
+  exit -1
+fi
+
 echo "
 ---- READ THIS ---- 
 When prompted for the 'local name for upstream repository', 
@@ -41,11 +46,12 @@ enter 'gcc'. The other fields can be the default
 "
 
 ${BASEDIR}/../../contrib/gcc-git-customization.sh
-${BASEDIR}/../../contrib/git-fetch-vendor.sh microsoft
+${BASEDIR}/../../contrib/git-fetch-vendor.sh --enable-push microsoft
 git fetch
 git fetch gcc
 git fetch origin
 git fetch vendors/microsoft
 git checkout -b $1 remotes/vendors/microsoft/main
 git merge origin/$2
-git push remotes/vendors/microsoft/main
+git push vendors/microsoft microsoft/main
+


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-07  1:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07  1:20 [gcc(refs/vendors/microsoft/heads/main)] More fixes Eugene Rozenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).