feat(build): update makefile to support ci releasing
This commit is contained in:
parent
8a8d536c84
commit
c4a7566e28
4 changed files with 11 additions and 4 deletions
|
|
@ -41,7 +41,7 @@ run_task = { name = "build", fork = true }
|
||||||
script_runner = "@duckscript"
|
script_runner = "@duckscript"
|
||||||
script = '''
|
script = '''
|
||||||
asset_dir = set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/assets
|
asset_dir = set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/assets
|
||||||
target_dir = set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/target
|
target_dir = set ${CARGO_TARGET_DIR}
|
||||||
data_dir = set ${target_dir}/dev-data
|
data_dir = set ${target_dir}/dev-data
|
||||||
rm -r ${data_dir}
|
rm -r ${data_dir}
|
||||||
cp ${asset_dir}/layouts ${data_dir}/
|
cp ${asset_dir}/layouts ${data_dir}/
|
||||||
|
|
@ -55,7 +55,7 @@ writefile ${data_dir}/VERSION ${CARGO_MAKE_CRATE_VERSION}
|
||||||
|
|
||||||
[tasks.launch]
|
[tasks.launch]
|
||||||
command = "cargo"
|
command = "cargo"
|
||||||
args = ["run", "--", "--data-dir", "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/target/dev-data/", "@@split(CARGO_MAKE_TASK_ARGS,;)"]
|
args = ["run", "--", "--data-dir", "${CARGO_TARGET_DIR}/dev-data/", "@@split(CARGO_MAKE_TASK_ARGS,;)"]
|
||||||
|
|
||||||
# Simple clippy tweak
|
# Simple clippy tweak
|
||||||
[tasks.clippy]
|
[tasks.clippy]
|
||||||
|
|
@ -70,7 +70,7 @@ script = '''
|
||||||
if is_dir ${CARGO_MAKE_TASK_ARGS}
|
if is_dir ${CARGO_MAKE_TASK_ARGS}
|
||||||
trigger_error "You need to specify a full path for the binary, not just a directory!"
|
trigger_error "You need to specify a full path for the binary, not just a directory!"
|
||||||
else
|
else
|
||||||
cp ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/target/release/${CARGO_MAKE_CRATE_NAME} ${CARGO_MAKE_TASK_ARGS}
|
cp ${CARGO_TARGET_DIR}/release/${CARGO_MAKE_CRATE_NAME} ${CARGO_MAKE_TASK_ARGS}
|
||||||
end
|
end
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
@ -81,7 +81,7 @@ run_task = { name = "build-release", fork = true }
|
||||||
[tasks.wasm-opt-tiles]
|
[tasks.wasm-opt-tiles]
|
||||||
script_runner = "@duckscript"
|
script_runner = "@duckscript"
|
||||||
script = '''
|
script = '''
|
||||||
tiles = glob_array ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/target/wasm32-wasi/release/*.wasm
|
tiles = glob_array ${CARGO_TARGET_DIR}/wasm32-wasi/release/*.wasm
|
||||||
|
|
||||||
for tile in ${tiles}
|
for tile in ${tiles}
|
||||||
tile_name = basename ${tile}
|
tile_name = basename ${tile}
|
||||||
|
|
@ -92,6 +92,13 @@ for tile in ${tiles}
|
||||||
end
|
end
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# CI Releasing Zellij
|
||||||
|
[tasks.ci-build-release]
|
||||||
|
workspace = false
|
||||||
|
dependencies = ["build-tiles-release", "wasm-opt-tiles", "build-release"]
|
||||||
|
command = "cargo"
|
||||||
|
args = ["build", "--verbose", "--release", "--target", "${CARGO_MAKE_TASK_ARGS}"]
|
||||||
|
|
||||||
# Publishing Zellij
|
# Publishing Zellij
|
||||||
[tasks.publish]
|
[tasks.publish]
|
||||||
clear = true
|
clear = true
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Reference in a new issue