Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .github/workflows/remove-old-artifacts.yml

This file was deleted.

1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "recommendations": ["Vue.volar", "esbenp.prettier-vscode"] }
7 changes: 3 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"githubPullRequests.ignoredPullRequestBranches": [
"main"
]
}
"[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[vue]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }
}
49 changes: 13 additions & 36 deletions scripts/build-backend
Original file line number Diff line number Diff line change
@@ -1,45 +1,22 @@
#!/usr/bin/env python3

import argparse
import shlex
import subprocess
from pathlib import Path

def build():
subprocess.run(
["mvn", "package", "site", "jacoco:report-aggregate"],
cwd="backend",
check=True,
)
DIR: Path = Path("backend")

def clean():
subprocess.run(
["mvn", "clean"],
cwd="backend",
check=True,
)

def main():
parser = argparse.ArgumentParser()
parser.add_argument(
"--clean", "-c",
action="store_true",
help="clean up build files instead of building"
)
args = parser.parse_args()
def run(*cmd: str | Path) -> None:
print(f"$ {shlex.join(str(arg) for arg in cmd)}")
subprocess.run(cmd, check=True, cwd=DIR)

if args.clean:
clean()
else:
try:
build()
except subprocess.CalledProcessError:
print()
print("Build failed :(")
exit(1)
else:
print()
print("Build successful :)")
print("The backend.jar is at backend/backend/target/backend.jar")
print("The runner.jar is at backend/runner/target/runner.jar")

if __name__ == "__main__":
main()
parser = argparse.ArgumentParser()
_args = parser.parse_args()

run("mvn", "package")
print()
print("The backend.jar is at backend/backend/target/backend.jar")
print("The runner.jar is at backend/runner/target/runner.jar")
84 changes: 25 additions & 59 deletions scripts/build-frontend
Original file line number Diff line number Diff line change
@@ -1,70 +1,36 @@
#!/usr/bin/env python3

import argparse
import shutil
import shlex
import subprocess
from pathlib import Path

def build(env):
subprocess.run(
["yarnpkg", "install"],
cwd="frontend",
check=True,
)
DIR: Path = Path("frontend")

if env is None:
subprocess.run(
["yarnpkg", "build"],
cwd="frontend",
check=True,
)
else:
subprocess.run(
["yarnpkg", "build", "--mode", env],
cwd="frontend",
check=True,
)

def clean(clean_all=False):
print("Removing frontend/dist/")
shutil.rmtree("frontend/dist/", ignore_errors=True)
def run(*cmd: str | Path) -> None:
print(f"$ {shlex.join(str(arg) for arg in cmd)}")
subprocess.run(cmd, check=True, cwd=DIR)

if clean_all:
print("Removing frontend/node_modules/")
shutil.rmtree("frontend/node_modules/", ignore_errors=True)

def main():
parser = argparse.ArgumentParser()
parser.add_argument(
"--env",
metavar="NAME",
help="name of the build environment to use. A corresponding file"
" '.env.NAME' must be present in the frontend/ directory"
)
parser.add_argument(
"--clean", "-c",
action="store_true",
help="clean up build files instead of building"
)
parser.add_argument(
"--clean-all",
action="store_true",
help="like --clean, but also removes node_modules"
)
args = parser.parse_args()
parser = argparse.ArgumentParser()
parser.add_argument(
"--env",
metavar="NAME",
help="name of the build environment to use. A corresponding file"
" '.env.NAME' must be present in the frontend/ directory",
)
args = parser.parse_args()

if args.clean or args.clean_all:
clean(args.clean_all)
else:
try:
build(args.env)
except subprocess.CalledProcessError:
print()
print("Build failed :(")
exit(1)
else:
print()
print("Build successful :)")
print("The frontend files are at frontend/dist/")
run(
"yarnpkg",
"install",
# Yarnpkg complains about incompatible node versions, but the build seems to
# run fine, so we just tell it to shut up.
"--ignore-engines",
)

if __name__ == "__main__":
main()
if args.env is None:
run("yarnpkg", "build")
else:
run("yarnpkg", "build", "--mode", args.env)
19 changes: 19 additions & 0 deletions scripts/clean-backend
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env python3

import argparse
import shlex
import subprocess
from pathlib import Path

DIR: Path = Path("backend")


def run(*cmd: str | Path) -> None:
print(f"$ {shlex.join(str(arg) for arg in cmd)}")
subprocess.run(cmd, check=True, cwd=DIR)


parser = argparse.ArgumentParser()
_args = parser.parse_args()

run("mvn", "clean")
27 changes: 27 additions & 0 deletions scripts/clean-frontend
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env python3

import argparse
import shutil
from pathlib import Path

DIR: Path = Path("frontend")


def rm(path: Path) -> None:
print(f"Removing {path}")
shutil.rmtree(path, ignore_errors=True)


parser = argparse.ArgumentParser()
parser.add_argument(
"--all",
"-a",
action="store_true",
help="remove node_modules as well",
)
args = parser.parse_args()

rm(DIR / "dist")

if args.all:
rm(DIR / "node_modules")
14 changes: 0 additions & 14 deletions scripts/deploy-kit/deploy.sh

This file was deleted.

34 changes: 0 additions & 34 deletions scripts/deploy-kit/kit-deployment.crt.pem

This file was deleted.

Loading