Compare commits
No commits in common. "main" and "dev-licensing" have entirely different histories.
main
...
dev-licens
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
### Eigene Skripte
|
### Eigene Skripte
|
||||||
|
|
||||||
Mittels der Prüfungs-Art `script`, kann man selbst definierte Prüf-Funktionen schreiben. Diese Skripte sollen durch exit-Codes das Ergebnis der Prüfung kommunizieren:
|
Mittels den Prüfungs-Art `script`, kann man selbst definierte Prüf-Funktionen schreiben. Diese Skripte sollen durch exit-Codes das Ergebnis der Prüfung kommunizieren:
|
||||||
|
|
||||||
- `0`: alles prima
|
- `0`: alles prima
|
||||||
- `1`: Warnung
|
- `1`: Warnung
|
||||||
|
|
@ -42,9 +42,9 @@ Die Konfiguration erfolgt in Form einer JSON-Datei gemäß des Schemas `doc/hmdl
|
||||||
|
|
||||||
### Manuell
|
### Manuell
|
||||||
|
|
||||||
- für einen einzelnen Ablauf: `build/heimdall examples/test.hdml.json` ausführen
|
- für ein einzelnen Ablauf: `build/heimdall -c examples/test.hdml.json` ausführen
|
||||||
- zum allgemeinenen Rumspielen:
|
- zum allgemeinenen Rumspielen:
|
||||||
- `watch -n 10 build/heimdall examples/test.hdml.json`
|
- `watch -n 10 build/heimdall -c examples/test.hdml.json`
|
||||||
- `touch /tmp/test` ausführen
|
- `touch /tmp/test` ausführen
|
||||||
- Werte in `examples/test.hdml.json` ändern
|
- Werte in `examples/test.hdml.json` ändern
|
||||||
|
|
||||||
|
|
|
||||||
66
tools/deploy
66
tools/deploy
|
|
@ -1,59 +1,19 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
import sys as _sys
|
|
||||||
import os as _os
|
|
||||||
import argparse as _argparse
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
## args
|
## args
|
||||||
argument_parser = _argparse.ArgumentParser()
|
|
||||||
argument_parser.add_argument(
|
if [ $# -ge 1 ] ; then target_ssh_handle=$1 && shift ; else target_ssh_handle="gs-monitoring" ; fi
|
||||||
type = str,
|
|
||||||
dest = "target_system",
|
|
||||||
metavar = "<target-system>",
|
|
||||||
help = "either 'localhost' or SSH handle of the target system",
|
|
||||||
)
|
|
||||||
argument_parser.add_argument(
|
|
||||||
"-t",
|
|
||||||
"--target-directory",
|
|
||||||
type = str,
|
|
||||||
dest = "target_directory",
|
|
||||||
default = "/opt/heimdall",
|
|
||||||
metavar = "<target-directory>",
|
|
||||||
help = "directory on the target system, where the files shall be put; default: /opt/heimdall",
|
|
||||||
)
|
|
||||||
argument_parser.add_argument(
|
|
||||||
"-b",
|
|
||||||
"--build-directory",
|
|
||||||
type = str,
|
|
||||||
dest = "build_directory",
|
|
||||||
default = "build",
|
|
||||||
metavar = "<build-directory>",
|
|
||||||
help = "directory to where the build was put",
|
|
||||||
)
|
|
||||||
args = argument_parser.parse_args()
|
|
||||||
|
|
||||||
## exec
|
## exec
|
||||||
if (not _os.path.exists(args.build_directory)):
|
|
||||||
_sys.stderr.write("-- build directory not found; probably you need to run /tools/build\n")
|
|
||||||
_sys.exit(1)
|
|
||||||
else:
|
|
||||||
_os.system(
|
|
||||||
" ".join([
|
|
||||||
"rsync",
|
|
||||||
"--recursive",
|
|
||||||
"--update",
|
|
||||||
"--verbose",
|
|
||||||
("%s/" % args.build_directory),
|
|
||||||
(
|
|
||||||
("%s" % args.target_directory)
|
|
||||||
if (args.target_system == "localhost") else
|
|
||||||
("%s:%s" % (args.target_system, args.target_directory, ))
|
|
||||||
),
|
|
||||||
])
|
|
||||||
)
|
|
||||||
|
|
||||||
|
rsync \
|
||||||
main()
|
--rsh=ssh \
|
||||||
|
--recursive \
|
||||||
|
--update \
|
||||||
|
--delete \
|
||||||
|
--exclude 'node_modules' \
|
||||||
|
--verbose \
|
||||||
|
build/ \
|
||||||
|
${target_ssh_handle}:/opt/heimdall
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue