-
Notifications
You must be signed in to change notification settings - Fork 12
/
Taskfile.yml
81 lines (68 loc) · 2.13 KB
/
Taskfile.yml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
version: "3"
tasks:
default:
deps: [install, test]
install:
cmds:
- |
cargo install cross
rustup component add clippy
run: cargo run -- data --skip-wait --format mp4
run_docker:
deps: [build_linux_x64]
cmds:
- |
docker build -t vidmerger .
docker container run -it --rm -v ./data:/data vidmerger
test: cargo test
lint: cargo clippy
build:
cmds:
- |
task: build_linux_x64
task: build_mac_x64
task: build_win_x64
task: shasum
build_linux_x64:
cmds:
- |
echo 'Building for Linux... 🐧'
mkdir -p target
sudo cross build --release --target=x86_64-unknown-linux-musl
mkdir -p target/release-archives
tar -C target/x86_64-unknown-linux-musl/release -czf target/release-archives/vidmerger-linux.tar.gz vidmerger
build_mac_x64:
cmds:
- |
echo 'Building for MacOS... 🍏'
mkdir -p target
rustup target add x86_64-apple-darwin
sudo cargo build --release --target x86_64-apple-darwin
mkdir -p target/release-archives
tar -C target/x86_64-apple-darwin/release -czf target/release-archives/vidmerger-mac.tar.gz vidmerger
build_win_x64:
cmds:
- |
echo 'Building for Windows... 🏳️🌈'
mkdir -p target
sudo rm -r target/release
sudo cross build --release --target x86_64-pc-windows-gnu
mkdir -p target/release-archives
cp target/x86_64-pc-windows-gnu/release/vidmerger.exe target/release-archives/vidmerger.exe
shasum: shasum -a 256 target/release-archives/vidmerger*
# TODO - test this
publish_choco:
cmds:
- |
choco pack
Get-ChildItem *.nupkg | ren -NewName vidmerger.nupkg
choco push vidmerger.nupkg --source https://push.chocolatey.org
Remove-Item vidmerger.nupkg
publish_dockerhub:
cmds:
- |
docker build --no-cache -t vidmerger .
docker tag vidmerger tgotwig/vidmerger:0.3.2
docker push tgotwig/vidmerger:0.3.2
docker tag vidmerger tgotwig/vidmerger
docker push tgotwig/vidmerger