oto/assets/pipeline-test2.yaml

108 lines
No EOL
2.3 KiB
YAML

---
property:
workspace: C:/Users/r0bin/AppData/Roaming/DarkSoulsIII
saveFolder: <!property.workspace>/01100001112a7a14
savePath: <!property.saveFolder>/DS30000.sl2
pipeline:
id: main
workflow:
- contain:
list: this is test
target: back
on-true:
- exe: print0
- exe: read-web
- exe: json-read-web
- exe: json-read-local
- exe: diff
- if:
condition-bool: <!property.diff> == true
on-true:
- exe: info
- if:
condition-date: <!property.lastSavedWeb> < <!property.info.modified>
on-true:
- exe: json-write-local
- exe: upload
- if:
condition-date: <!property.lastSavedWeb> > <!property.lastSavedLocal>
on-true:
- exe: json-write-web
- exe: download
commands:
- command: Print
id: print0
param:
message: test
- command: FileInfo
id: info
param:
path: <!property.savePath>
setInfo: <@property.info>
- command: WebRequest
id: read-web
param:
url: https://toki-labs.com/cdn/save/darksoulIII/save.json
setResponse: <@property.web>
- command: JsonReader
id: json-read-web
param:
json: <!property.web>
pair:
- from: lastSaved
setValue: <@property.lastSavedWeb>
- command: JsonReaderFile
id: json-read-local
param:
path: <!property.saveFolder>/save.json
pair:
- from: lastSaved
setValue: <@property.lastSavedLocal>
- command: Print
id: print
param:
message: change save file
- command: FileDiffCheck
id: diff
param:
paths:
- <!property.savePath>
setDiff: <@property.diff>
- command: JsonWriterFile
id: json-write-local
param:
path: <!property.saveFolder>/save.json
pair:
- from: lastSaved
value: <!property.info.modified>
- command: Copy
id: upload
param:
copyMap:
<!property.savePath> : \\192.168.0.97\Macintosh HD\Users\toki\docker\nginx\home\cdn\save\darksoulIII
<!property.saveFolder>/save.json : \\192.168.0.97\Macintosh HD\Users\toki\docker\nginx\home\cdn\save\darksoulIII
- command: JsonWriterFile
id: json-write-web
param:
path: <!property.saveFolder>/save.json
pair:
- from: lastSaved
value: <!property.lastSavedWeb>
- command: Copy
id: download
param:
copyMap:
\\192.168.0.97\Macintosh HD\Users\toki\docker\nginx\home\cdn\save\darksoulIII\DS30000.sl2 : <!property.saveFolder>