Skip to content

Commit

Permalink
trying to fix all workflows to work.
Browse files Browse the repository at this point in the history
  • Loading branch information
joshreve committed Aug 22, 2021
1 parent f94209c commit 33302b0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@
debug_*
*/__pycache__/*
*~$*
things/
things/*.scad
things/*.step
things/*.stl
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ current_dir := $(dir $(mkfile_path))

source_dir := ${current_dir}"src"
artifact_dir := ${current_dir}"things"
config_dir := ${current_dir}"configs"

DOCKER_CMD := "docker"
.DEFAULT_GOAL := help
Expand Down Expand Up @@ -34,27 +35,27 @@ build-container: check-requirements ## Build docker container.

config: check-requirements ## Generate configuration.
@echo "\nGenerate configuration..\n" && \
${DOCKER_CMD} run --rm --name DM-config -v ${source_dir}:/app/src -v ${artifact_dir}:/app/things dactyl-keyboard python3 -i generate_configuration.py && \
${DOCKER_CMD} run --rm --name DM-config -v ${source_dir}:/app/src -v ${artifact_dir}:/app/things -v ${config_dir}:/app/configs dactyl-keyboard python3 -i generate_configuration.py && \
echo "Done"
.PHONY: config

build-models: check-requirements ## Build models.
@echo "\nGenerate configured model..\n" && \
cd ${current_dir} && \
${DOCKER_CMD} run --rm --name DM-run -v ${source_dir}:/app/src -v ${artifact_dir}:/app/things dactyl-keyboard python3 -i dactyl_manuform.py && \
${DOCKER_CMD} run --rm --name DM-run -v ${source_dir}:/app/src -v ${artifact_dir}:/app/things -v ${config_dir}:/app/configs dactyl-keyboard python3 -i dactyl_manuform.py && \
echo "Done"
.PHONY: config

build-models: check-requirements ## Build models.
@echo "\nGenerate release models..\n" && \
cd ${current_dir} && \
${DOCKER_CMD} run --rm --name DM-release-build -v ${source_dir}:/app/src -v ${artifact_dir}:/app/things dactyl-keyboard python3 -i model_builder.py && \
${DOCKER_CMD} run --rm --name DM-release-build -v ${source_dir}:/app/src -v ${artifact_dir}:/app/things -v ${config_dir}:/app/configs dactyl-keyboard python3 -i model_builder.py && \
echo "Done"
.PHONY: config


shell: check-requirements ## Open an interactive shell inside a container.
@${DOCKER_CMD} run --rm -it --name DM-shell -v ${source_dir}:/app/src -v ${artifact_dir}:/app/things dactyl-keyboard bash && \
@${DOCKER_CMD} run --rm -it --name DM-shell -v ${source_dir}:/app/src -v ${artifact_dir}:/app/things -v ${config_dir}:/app/configs dactyl-keyboard bash && \
echo "\nBye!"
.PHONY: shell

Empty file added things/.gitkeep
Empty file.

0 comments on commit 33302b0

Please sign in to comment.