From 283e888eea5a87057c069aed0c256003d050a048 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 8 Oct 2024 20:02:33 +0200 Subject: [PATCH 1/6] build --- build.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 build.py diff --git a/build.py b/build.py new file mode 100755 index 0000000..ea0e179 --- /dev/null +++ b/build.py @@ -0,0 +1,10 @@ +#! /usr/bin/env python3 +"""Dummy build.""" + +from pathlib import Path + +from rwx.fs import make_directory + +if __name__ == "__main__": + root = Path(__file__).parent + make_directory(root / "out") From bd31e060ab44dd7644164fcd5a82b4514810197b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 8 Oct 2024 20:05:21 +0200 Subject: [PATCH 2/6] index.html --- build.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.py b/build.py index ea0e179..9f97035 100755 --- a/build.py +++ b/build.py @@ -6,5 +6,6 @@ from pathlib import Path from rwx.fs import make_directory if __name__ == "__main__": - root = Path(__file__).parent - make_directory(root / "out") + out = Path(__file__).parent / "out" + make_directory(out) + write(out / "index.html", "spcd.rwx.work") From e454f7fe9f6bea263a76bef09401ad8267db7fa6 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 8 Oct 2024 20:09:44 +0200 Subject: [PATCH 3/6] fix --- build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.py b/build.py index 9f97035..0a29dce 100755 --- a/build.py +++ b/build.py @@ -3,7 +3,7 @@ from pathlib import Path -from rwx.fs import make_directory +from rwx.fs import make_directory, write if __name__ == "__main__": out = Path(__file__).parent / "out" From b97e408a1014abd7375f5afe3cac30c42456a300 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 13 Oct 2024 16:28:39 +0200 Subject: [PATCH 4/6] branch/web --- spcd/cmd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spcd/cmd.py b/spcd/cmd.py index 02a2b49..0dbfe90 100644 --- a/spcd/cmd.py +++ b/spcd/cmd.py @@ -43,9 +43,9 @@ def spcd_synchronize( user = "cd" host = env.SPCD_PROJECT_PATH root = ( - Path(os.sep) / user / project.branch / projects.group / project.name + Path(os.sep) / user / projects.group / project.name / project.branch ) - target = f"{user}@{host}:{root}" + target = f"{user}@{host}:{root}/web" if not source: source = "out" ps.run( From 6baf14a79e185605f45f04b6424da6d026f1f198 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 13 Oct 2024 17:59:35 +0200 Subject: [PATCH 5/6] =?UTF-8?q?source=20=E2=86=94=20target?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spcd/cmd.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spcd/cmd.py b/spcd/cmd.py index 0dbfe90..0144663 100644 --- a/spcd/cmd.py +++ b/spcd/cmd.py @@ -30,14 +30,14 @@ def spcd_check_project() -> None: def spcd_synchronize( - target: str | None = None, source: str | None = None + source: str | None = None, target: str | None = None ) -> None: """Synchronize output towards a target. - :param target: where to deploy to - :type target: str | None :param source: where to deploy from :type source: str | None + :param target: where to deploy to + :type target: str | None """ if not target: user = "cd" From 8fb9aff2a9695f1be82407a07b10818d4208f68b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 13 Oct 2024 20:30:35 +0200 Subject: [PATCH 6/6] =?UTF-8?q?=E2=88=92/web?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spcd/cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spcd/cmd.py b/spcd/cmd.py index 0144663..188d191 100644 --- a/spcd/cmd.py +++ b/spcd/cmd.py @@ -45,7 +45,7 @@ def spcd_synchronize( root = ( Path(os.sep) / user / projects.group / project.name / project.branch ) - target = f"{user}@{host}:{root}/web" + target = f"{user}@{host}:{root}" if not source: source = "out" ps.run(