just throwin there
This commit is contained in:
commit
278d7cf05d
1 changed files with 5712 additions and 0 deletions
52
Makefile.toml
Normal file
52
Makefile.toml
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
[env]
|
||||
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
|
||||
|
||||
[env.development]
|
||||
PROD = false
|
||||
DEV = true
|
||||
_MK_IMAGE_TARGET = 'app-debug'
|
||||
_MK_IMAGE = 'source.spushk.ru/rustyworks/adsbot:debug'
|
||||
|
||||
[env.production]
|
||||
PROD = true
|
||||
DEV = false
|
||||
_MK_IMAGE_TARGET = 'app-release'
|
||||
_MK_IMAGE = 'source.spushk.ru/rustyworks/adsbot:v0.1'
|
||||
|
||||
[tasks.rustfmt]
|
||||
command = "cargo"
|
||||
args = ["fmt", "--", "--emit=files"]
|
||||
|
||||
[tasks.format]
|
||||
dependencies = ["rustfmt"]
|
||||
|
||||
[tasks.build]
|
||||
workspace = false
|
||||
command = "cargo"
|
||||
args = ["build"]
|
||||
|
||||
[tasks.image]
|
||||
workspace = false
|
||||
condition.env_set = ["_MK_IMAGE_TARGET", "_MK_IMAGE"]
|
||||
command = "podman"
|
||||
args = [
|
||||
"build",
|
||||
"--target", "${_MK_IMAGE_TARGET}",
|
||||
"-t", "${_MK_IMAGE}",
|
||||
"."
|
||||
]
|
||||
|
||||
[tasks.image-view]
|
||||
workspace = false
|
||||
condition.env_set = ["_MK_IMAGE"]
|
||||
condition.files_exist = ["${CARGO_MAKE_WORKING_DIRECTORY}/dev-volumes"]
|
||||
command = "podman"
|
||||
args = [
|
||||
"run",
|
||||
"--rm",
|
||||
"-p3000:3000",
|
||||
"-v./dev-volumes/adsbot.conf:/adsbot.conf",
|
||||
"-v./dev-volumes/adsbot.log:/adsbot.log",
|
||||
"-v./dev-volumes/adsbot.db:/adsbot.db",
|
||||
"${_MK_IMAGE}"
|
||||
]
|
||||
Loading…
Reference in a new issue