-
Notifications
You must be signed in to change notification settings - Fork 1
/
oJobSVN.yaml
58 lines (52 loc) · 3.04 KB
/
oJobSVN.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# SVN oJob functionality
# Copyright 2023 Nuno Aguiar
jobs:
- name: SVN checkout
help: >
Will checkout a SVN repository. Expects:
- url (String) The SVN URL to access the repository.
- user (String) If necessary the SVN username to login into the repository.
- pass (String) If necessary the SVN password to login into the repository (can be encrypted).
- target (String) The checkout path (if not provided will default to ".").
- rev (String) Optionally the revision to checkout (e.g. number of revision, HEAD, WORKING, PREVIOUS, BASE or COMMITED).
- quiet (Boolean) Should not output (if true) the revision that was checkout.
exec: >
if (isUnDef(args.url)) throw "Please provide a SVN url in args.url";
plugin("SVN");
var svn = new SVN(args.url, args.user, args.pass);
if (isUnDef(args.target)) args.target = ".";
var args.checkoutRev = svn.checkout(args.target, args.rev);
if (!quiet) log("Revision " + args.checkoutRev + " checkout (" + args.url + ")");
- name: SVN update
help: >
Will update a SVN repository. Expects:
- url (String) The SVN URL to access the repository
- user (String) If necessary the SVN username to login into the repository
- pass (String) If necessary the SVN password to login into the repository (can be encrypted)
- froms (Array) An array of filepaths to update (if not provided will default to ".").
- rev (String) Optionally the revision to update (e.g. number of revision, HEAD, WORKING, PREVIOUS, BASE or COMMITED)
- quiet (Boolean) Should not output (if true) the revision that was checkout.
exec: >
if (isUnDef(args.url)) throw "Please provide a SVN url in args.url";
plugin("SVN");
var svn = new SVN(args.url, args.user, args.pass);
if (isUnDef(args.froms)) args.froms = ["."];
var args.updateRev = svn.update(args.froms, args.rev);
if (!quiet) log("Result of update: " + stringify(args.updateRev));
- name: SVN commit
help: >
Will add and commit to SVN repository. Expects:
- url (String) The SVN URL to access the repository
- user (String) If necessary the SVN username to login into the repository
- pass (String) If necessary the SVN password to login into the repository (can be encrypted)
- froms (Array) An array of filepaths to update (if not provided will default to ".").
- comment (String) Comment to use for commit.
- quiet (Boolean) Should not output (if true) the revision that was checkout.
exec: >
/*if (isUnDef(args.url)) throw "Please provide a SVN url in args.url";
plugin("SVN");
var svn = new SVN(args.url, args.user, args.pass);
if (isUnDef(args.froms)) args.froms = ["."];
var filepaths = $stream($from(args.from).select(
var args.updateRev = svn.update(args.froms, args.rev);
if (!quiet) log("Result of update: " + stringify(args.updateRev));*/