Skip to content

Commit 307a3e7

Browse files
committed
Merge branch 'unstable' into stable
2 parents 8c9578d + 42aebd7 commit 307a3e7

File tree

14 files changed

+114
-154
lines changed

14 files changed

+114
-154
lines changed

.depl/config.yaml

Lines changed: 100 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -1,160 +1,120 @@
11
project_name: smart-patcher
2-
version: 5
3-
langs:
4-
- rust
5-
targets:
6-
- arch: x86_64
7-
os: linux
8-
os_derivative: any
9-
os_version:
10-
type: no
11-
cache_files:
2+
version: 7
3+
ignore_files:
124
- .git
5+
cache_files:
136
- Cargo.lock
7+
- examples
148
- target
15-
variables: []
9+
variables:
10+
app:
11+
is_secret: false
12+
value:
13+
type: plain
14+
value: target/release/smart-patcher
15+
actions:
16+
- info: cargo-fmt@0.1.0
17+
action:
18+
type: staged
19+
stage: build
20+
cmd: cargo fmt -- --config tab_spaces=2,max_width=120 */**/*.rs
21+
- info: cargo-install-by-copy@0.1.0
22+
action:
23+
type: staged
24+
stage: build
25+
cmd: cp -f %bin% ~/.cargo/bin
26+
placeholders:
27+
- "%bin%"
28+
- info: cargo-lint@0.1.0
29+
action:
30+
type: staged
31+
stage: build
32+
cmd: cargo clippy
33+
show_success_output: true
34+
- info: cargo-release@0.1.0
35+
tags:
36+
- rust
37+
- cargo
38+
requirements:
39+
- type: exists_any
40+
paths:
41+
- /bin/cargo
42+
- ~/.cargo/bin/cargo
43+
action:
44+
type: staged
45+
stage: build
46+
cmd: cargo build --release
47+
- info: cargo-test@0.1.0
48+
action:
49+
type: staged
50+
stage: build
51+
cmd: cargo test --lib
52+
- info: sp-copy-tests@0.1.0
53+
action:
54+
type: custom
55+
cmd: cp tests/*.py .
56+
- info: sp-generate-examples@0.1.0
57+
action:
58+
type: staged
59+
stage: deploy
60+
cmd: cargo run --no-default-features --features=generate-patches -- generate-examples
61+
- info: upx@0.1.0
62+
requirements:
63+
- type: exists_any
64+
paths:
65+
- /bin/upx
66+
- /usr/bin/upx
67+
- ~/.local/bin/upx
68+
action:
69+
type: staged
70+
stage: build
71+
cmd: upx %af%
72+
placeholders:
73+
- "%af%"
1674
pipelines:
17-
- title: build
18-
desc: Got from `Default Rust Pipeline`.
19-
info: rust-default@0.1.0
75+
- title: generate-examples
76+
desc: Generate example patches and move them to the project folder
77+
info: generate-examples@0.1.0
78+
tags:
79+
- rust
80+
- cargo
81+
default: false
82+
artifacts:
83+
- from: examples
84+
to: ../examples
85+
actions:
86+
- title: Generate examples
87+
used: sp-generate-examples@0.1.0
88+
- title: install
89+
desc: Default Rust pipeline to install binary
90+
info: rust-default-install@0.1.0
2091
tags:
2192
- rust
2293
- cargo
94+
- clippy
95+
- fmt
2396
- upx
2497
default: true
98+
exclusive_exec_tag: ""
2599
artifacts:
26100
- from: target/release/smart-patcher
27101
to: smart-patcher
28102
actions:
29103
- title: Lint
30-
info: cargo-clippy@0.1.0
31-
tags:
32-
- cargo
33-
- clippy
34-
action:
35-
type: pre_build
36-
supported_langs:
37-
- rust
38-
commands:
39-
- bash_c: cargo clippy --no-default-features
40-
show_success_output: true
41-
- title: Lint v2
42-
info: cargo-clippy@0.1.0
43-
tags:
44-
- cargo
45-
- clippy
46-
action:
47-
type: pre_build
48-
supported_langs:
49-
- rust
50-
commands:
51-
- bash_c: cargo clippy --no-default-features --features=lua,rhai
52-
show_success_output: true
104+
used: cargo-lint@0.1.0
53105
- title: Format
54-
info: cargo-format@0.1.0
55-
tags: []
56-
exec_in_project_dir: true
57-
action:
58-
type: pre_build
59-
supported_langs:
60-
- rust
61-
commands:
62-
- bash_c: cargo fmt -- --config tab_spaces=2,max_width=120 */**/*.rs
106+
used: cargo-fmt@0.1.0
63107
- title: Build
64-
info: cargo-rel@0.1.0
65-
tags:
66-
- rust
67-
- cargo
68-
action:
69-
type: build
70-
supported_langs:
71-
- rust
72-
commands:
73-
- bash_c: cargo build --release --no-default-features --features=lua,rhai
108+
used: cargo-release@0.1.0
109+
- title: Copy tests
110+
used: sp-copy-tests@0.1.0
74111
- title: Test
75-
info: cargo-test@0.1.0
76-
tags:
77-
- cargo
78-
- rust
79-
- test
80-
action:
81-
type: post_build
82-
supported_langs:
83-
- rust
84-
commands:
85-
- bash_c: cp tests/*.py .
86-
- bash_c: cargo test --lib --no-default-features --features=lua,rhai
112+
used: cargo-test@0.1.0
87113
- title: Compress
88-
info: upx-compress@0.1.0
89-
tags:
90-
- upx
91-
action:
92-
type: post_build
93-
supported_langs:
94-
- rust
95-
- go
96-
- c
97-
- cpp
98-
- python
99-
- any
100-
commands:
101-
- bash_c: upx <artifact>
102-
ignore_fails: true
103-
show_bash_c: false
104-
placeholders:
105-
- <artifact>
106-
replacements:
107-
- group:
108-
- from: <artifact>
109-
to:
110-
title: target/release/smart-patcher
111-
is_secret: false
112-
value:
113-
type: plain
114-
value: target/release/smart-patcher
114+
used: upx@0.1.0
115+
with:
116+
"%af%": app
115117
- title: Install
116-
info: install-to-cargo-bin@0.1.0
117-
tags:
118-
- rust
119-
- cargo
120-
action:
121-
type: post_build
122-
supported_langs:
123-
- rust
124-
commands:
125-
- bash_c: cp -f <af> ~/.cargo/bin
126-
only_when_fresh: false
127-
placeholders:
128-
- <af>
129-
replacements:
130-
- group:
131-
- from: <af>
132-
to:
133-
title: target/release/smart-patcher
134-
is_secret: false
135-
value:
136-
type: plain
137-
value: target/release/smart-patcher
138-
- title: generate-patches
139-
desc: Got from `Default Rust Pipeline`.
140-
info: rust-default@0.1.0
141-
tags:
142-
- rust
143-
- cargo
144-
- upx
145-
artifacts:
146-
- from: target/release/smart-patcher
147-
to: smart-patcher
148-
actions:
149-
- title: Generate patches
150-
info: cargo-run@0.1.0
151-
tags:
152-
- rust
153-
- cargo
154-
action:
155-
type: build
156-
supported_langs:
157-
- rust
158-
commands:
159-
- bash_c: cargo run --no-default-features --features=generate-patches -- generate-examples
160-
show_success_output: true
118+
used: cargo-install-by-copy@0.1.0
119+
with:
120+
"%bin%": app

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ uuid = { version = "1.18.0", features = ["v4"] }
2121
walkdir = "2.5"
2222

2323
[features]
24-
default = []
24+
default = ["lua", "rhai"]
2525
generate-patches = ["lua", "rhai"]
2626
lua = ["dep:mlua"]
2727
rhai = ["dep:rhai"]

examples/patch1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
}
1616
}
1717
]
18-
}
18+
}

examples/patch10.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
"insert": " v2"
1515
}
1616
]
17-
}
17+
}

examples/patch2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
"insert": " v2"
1111
}
1212
]
13-
}
13+
}

examples/patch3.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
"insert": "v2 "
1111
}
1212
]
13-
}
13+
}

examples/patch4.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
"insert": " v2"
1717
}
1818
]
19-
}
19+
}

examples/patch5.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
"sh": "../tests/test_v5.py"
1414
},
1515
"patch_area": [],
16-
"insert": {
16+
"replace": {
1717
"from_to": [
1818
"game",
1919
"rock"
2020
]
2121
}
2222
}
2323
]
24-
}
24+
}

examples/patch6.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
"insert": " v2"
1717
}
1818
]
19-
}
19+
}

examples/patch7.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
"insert": " v2"
1717
}
1818
]
19-
}
19+
}

0 commit comments

Comments
 (0)