xaizek / fragile (License: AGPLv3+) (since 2018-12-07)
Simple lightweight CI, attempting to be somewhat Unix-like in its philosophy.
Commit b3ac4649567d08b447280d984c0145595cc2f00e

Add "clean" command that removes buildboxes
Author: xaizek
Author date (UTC): 2018-02-11 14:02
Committer name: xaizek
Committer date (UTC): 2018-02-11 14:08
Parent(s): 73dc60b82eee66e1e165410340b86f939185c767
Signing key: 99DC5E4DB05F6BE2
Tree: e894343f09e1a669f28fbd5b7f894e1217ef4c3c
File Lines added Lines deleted
new.php 16 0
File new.php changed (mode: 100644) (index eae5936..cdc197e)
15 15
16 16 require_once __DIR__ . '/classes/Build.php'; require_once __DIR__ . '/classes/Build.php';
17 17 require_once __DIR__ . '/classes/Buildset.php'; require_once __DIR__ . '/classes/Buildset.php';
18 require_once __DIR__ . '/classes/Utils.php';
19 require_once __DIR__ . '/config.php';
18 20
19 21 if (sizeof($argv) < 3) { if (sizeof($argv) < 3) {
20 22 print "Usage: ${argv[0]} name revision [builder-name..]\n"; print "Usage: ${argv[0]} name revision [builder-name..]\n";
 
... ... if (sizeof($argv) < 3) {
24 26 $name = $argv[1]; $name = $argv[1];
25 27 $revision = $argv[2]; $revision = $argv[2];
26 28
29 if (substr($name, 0, strlen('fragile/')) === 'fragile/') {
30 $command = substr($name, strlen('fragile/'));
31 switch ($command) {
32 case 'clean':
33 // XXX: ideally, this would only schedule the operation for the
34 // daemon; currently, we can change FS in parallel with it
35 Utils::delTree(BUILDS_PATH);
36 exit("Cleaned ".BUILDS_PATH);
37
38 default:
39 exit("Unknown command: .$command");
40 }
41 }
42
27 43 $buildset = Buildset::create($name, $revision); $buildset = Buildset::create($name, $revision);
28 44
29 45 if (sizeof($argv) > 3) { if (sizeof($argv) > 3) {
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/fragile

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/fragile

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master