]> git.agnieray.net Git - galette.git/commitdiff
Configurable ssh host and path for releases
authorJohan Cwiklinski <johan@x-tnd.be>
Fri, 5 Apr 2024 19:45:50 +0000 (21:45 +0200)
committerJohan Cwiklinski <johan@x-tnd.be>
Fri, 5 Apr 2024 19:45:50 +0000 (21:45 +0200)
bin/release

index aee3b22a19e2806c8103f66c1c377f261d41618e..6db1cf1bf016b8e5bb07951fb96b3d68f97a560c 100755 (executable)
@@ -6,7 +6,15 @@ from datetime import datetime
 from termcolor import colored
 from urllib.parse import urlparse
 
-galette_dl_repo = 'http://download.tuxfamily.org/galette/'
+#on tuxfamily
+#ssh_path = 'galette/galette-repository/'
+#ssh_host = 'ssh.tuxfamily.org'
+#galette_dl_repo = 'http://download.tuxfamily.org/galette/'
+#on ulysses
+ssh_path = '/var/www/galette.eu/download/'
+ssh_host = 'ulysses.fr'
+galette_dl_repo = 'https://galette.eu/download/'
+
 local_dl_repo = os.path.join(
     os.path.dirname(
         os.path.dirname(os.path.abspath(__file__))
@@ -304,16 +312,17 @@ def do_sign(archive):
     p1.communicate()
 
 def do_scp(archive):
-    global ssh_key
+    global ssh_key, ssh_host, ssh_path
 
-    path = 'galette/galette-repository/'
+    #path = 'galette/galette-repository/'
+    path = ssh_path
     if extra:
         path += 'dev/'
 
     if ssh_key:
-        scp_cmd = 'scp -i %s %s* ssh.tuxfamily.org:%s' % (ssh_key, archive, path)
+        scp_cmd = 'scp -i %s %s* %s:%s' % (ssh_key, archive, ssh_host, path)
     else:
-        scp_cmd = 'scp -r %s* ssh.tuxfamily.org:%s' % (archive, path)
+        scp_cmd = 'scp -r %s* %s:%s' % (archive, ssh_host, path)
     print(scp_cmd)
     p1 = subprocess.Popen(scp_cmd, shell=True)
     p1.communicate()