[neon-notifications] Changes in repo-metadata
Neon CI
noreply at kde.org
Tue May 19 19:46:13 BST 2020
commit 04cae4146f29b352512e26945b333945ceeeab18
Author: Friedrich W. H. Kossebau <kossebau at kde.org>
Date: Tue May 19 17:20:20 2020 +0200
git-kclone: fix own name in usage tip
diff --git a/git-helpers/git-kclone b/git-helpers/git-kclone
index 3c86f4ea..dbfe55b3 100755
--- a/git-helpers/git-kclone
+++ b/git-helpers/git-kclone
@@ -12,7 +12,7 @@ gitPushPattern = "git at invent.kde.org:{0}"
# First we need to make sure we have at least one argument
if len(sys.argv) < 2:
print("Error: Missing name of repository to clone")
- print("Usage: git kde-clone <repository-name> <other git clone parameters>")
+ print("Usage: git kclone <repository-name> <other git clone parameters>")
sys.exit(10)
# Determine where the repository metadata tree lives
commit 9492878e2ee760dad55edc0466a5e5f861576706
Author: Friedrich W. H. Kossebau <kossebau at kde.org>
Date: Tue May 19 16:53:57 2020 +0200
Make git-kpull add .git suffixes to urls
diff --git a/git-helpers/git-kpull b/git-helpers/git-kpull
index 2479c62f..cc33c153 100755
--- a/git-helpers/git-kpull
+++ b/git-helpers/git-kpull
@@ -6,10 +6,11 @@ import yaml
import subprocess
# Urls to update what we have currently to
-newPullPattern = "https://invent.kde.org/{0}"
-newPushPattern = "git at invent.kde.org:{0}"
+newPullPattern = "https://invent.kde.org/{0}.git"
+newPushPattern = "git at invent.kde.org:{0}.git"
# Old Url to match on when checking to see if we need to update something....
+# writing an expression to optionally drop .git suffix not easy, so removed manually below before
oldPushUrlRegex = ".*git at git.kde.org[/:](.*)"
# Determine where the repository metadata tree lives
@@ -51,6 +52,7 @@ for currentPath, subdirectories, filesInFolder in os.walk( repositoryMetadataPre
gitGetPushUrlCommand = 'git remote get-url --push origin'
process = subprocess.Popen( gitGetPushUrlCommand, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, cwd=os.getcwd() )
currentPushUrl = process.stdout.readline().decode('utf-8').strip()
+currentPushUrl = re.sub(r'\.git$', '', currentPushUrl) # remove any existing .git suffix, added anyway again
# Pull the repository identifier out of that
currentPushMatch = re.match( oldPushUrlRegex, currentPushUrl )
More information about the neon-notifications
mailing list