diff options
author | user <user@localhost.localdomain> | 2019-08-13 13:16:55 -0400 |
---|---|---|
committer | user <user@localhost.localdomain> | 2019-08-13 13:20:42 -0400 |
commit | 773eb08705998951940cee193b0d880cab2f3e8f (patch) | |
tree | 7b5eee20948a3cbabf4e418839007a8f3ccc1879 | |
parent | fdf39fe6867f28c8308e91480ad90df6284912a1 (diff) | |
download | standingwithresilience-773eb08705998951940cee193b0d880cab2f3e8f.tar.gz standingwithresilience-773eb08705998951940cee193b0d880cab2f3e8f.zip |
update branchable git url
-rw-r--r-- | backend/resilient/__init__.py | 15 | ||||
-rwxr-xr-x | backend/update.py | 2 |
2 files changed, 13 insertions, 4 deletions
diff --git a/backend/resilient/__init__.py b/backend/resilient/__init__.py index fc8c949..026dee1 100644 --- a/backend/resilient/__init__.py +++ b/backend/resilient/__init__.py @@ -1,3 +1,9 @@ +# this is a library to keep a shared repository with many forms of backups + +# atm, git and ikiwiki are required, but it should be reasonable to make other approaches + # git saves history + # ikiwiki connects git to online presentation and collaboration + import fileinput import os import shlex @@ -38,6 +44,7 @@ class git: found = (os.system("git status --porcelain") == 0) if not found: print("ERROR: git not found") + # TODO; download git, place in dep_path, and run from there exit(1) os.system("git submodule init") @@ -74,24 +81,26 @@ class git: def pull(self): if self.remote == None: return False - os.environ["GIT_SSH_COMMAND"] = "ssh -F %s" % ssh_config_path + os.environ["GIT_SSH_COMMAND"] = os.environ["GIT_SSH"] = "/bin/env ssh -F %s" % ssh_config_path status = os.system("git pull %s master" % self.remote) del os.environ["GIT_SSH_COMMAND"] + del os.environ["GIT_SSH"] return status == 0 def push(self): if self.push_remote == None: return False - os.environ["GIT_SSH_COMMAND"] = "ssh -F %s" % ssh_config_path + os.environ["GIT_SSH_COMMAND"] = os.environ["GIT_SSH"] = "/bin/env ssh -F %s" % ssh_config_path status = os.system("git push %s master" % self.push_remote) del os.environ["GIT_SSH_COMMAND"] + del os.environ["GIT_SSH"] return status == 0 class ikiwiki: found = (os.system("ikiwiki --version") == 0) if not found: - print("WARNING: ikiwiki not found, pages will not be built") + print("WARNING: ikiwiki not found. please add code to fetch and build the backend/dep/ikiwiki submodule.") synced = False diff --git a/backend/update.py b/backend/update.py index 50c3983..0f5577a 100755 --- a/backend/update.py +++ b/backend/update.py @@ -27,7 +27,7 @@ if resilient.freenet.freesitemgr.found and resilient.freenet.running: ##################### Instantiate remotes git_repos = [ - resilient.git('git://standingwithresilience.branchable.com/'), + resilient.git('ssh://b-standingwithresilience@standingwithresilience.branchable.com/'), resilient.git('fairlystable-guest:/srv/git/standingwithresilience'), resilient.git('https://gitlab.com/standingwithresilience/standingwithresilience.gitlab.io.git', None) ] |