mirror of
https://github.com/lubuntu-team/new-release.git
synced 2025-03-10 06:31:09 +00:00
Remove the manual hacking of HEAD on the remote.
Additionally, bump the copyright to 2019.
This commit is contained in:
parent
3cf55ad1e4
commit
1aca06be19
15
setup-phab
15
setup-phab
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright (C) 2018 Lubuntu Team
|
||||
# Copyright (C) 2018-2019 Lubuntu Team
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -16,15 +16,11 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import git
|
||||
import paramiko
|
||||
import tempfile
|
||||
from phabricator import Phabricator
|
||||
|
||||
RELEASE = ""
|
||||
PASTRELEASE = ""
|
||||
SERVERHOST = ""
|
||||
SERVERUSER = ""
|
||||
REPOLOCATION = ""
|
||||
REPOLISTPATH = ""
|
||||
CLONEBASE = ""
|
||||
phab = Phabricator(host="" + "/api/", token="")
|
||||
@ -50,12 +46,3 @@ with tempfile.TemporaryDirectory() as workingdir:
|
||||
repo_id = rename_result["object"]["id"]
|
||||
phab.diffusion.looksoon(repositories=[repository])
|
||||
print("Changed the default branch of " + repository + " to ubuntu/" + RELEASE + " in Phab.")
|
||||
|
||||
# Change the HEAD file on the remote
|
||||
serverconn = paramiko.SSHClient()
|
||||
serverconn.load_system_host_keys()
|
||||
serverconn.connect(SERVERHOST, username=SERVERUSER)
|
||||
command = "echo 'ref: refs/heads/ubuntu/{branch}' | sudo tee {repopath}{repoid}/HEAD".format(branch=RELEASE, repopath=REPOLOCATION, repoid=repo_id)
|
||||
(stdin_, stdout_, stderr_) = serverconn.exec_command(command)
|
||||
serverconn.close()
|
||||
print("Changed the HEAD of " + repository + " to ubuntu/" + RELEASE + " in Phab.")
|
||||
|
Loading…
x
Reference in New Issue
Block a user