Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ help: ## Show target prefixes and available targets.
@printf " run-* Processes and commands that run inside the dev container.\n"
@printf "\nGeneral:\n"
@awk 'BEGIN {FS = ":.*## "}; /^help:.*## / {printf "%-28s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
@awk 'BEGIN {FS = ":.*## "}; /^build-[a-zA-Z0-9_-]+:.*## / {printf "%-28s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
@awk 'BEGIN {FS = ":.*## "}; /^(build|deploy)-[a-zA-Z0-9_-]+:.*## / {printf "%-28s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
@printf "\ndev-* targets:\n"
@awk 'BEGIN {FS = ":.*## "}; /^dev-[a-zA-Z0-9_-]+:.*## / {printf "%-28s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
@printf "\ndc-* targets:\n"
Expand Down Expand Up @@ -74,6 +74,14 @@ build-tq-dev: ## Build tq and service binaries with the dev profile.
go build -o "$(HOME)/.tasq-dev/system/bin/orchestrator" ./cmd/orchestrator
go build -ldflags "-X github.com/version-1/tasq/internal/buildinfo.commit=$(TQ_BUILD_COMMIT)" -o "$(HOME)/.tasq-dev/system/bin/web" ./cmd/web

.PHONY: deploy-tq-dev
deploy-tq-dev: ## Stop services, build tqdev, deploy it, and restart services. Usage: make deploy-tq-dev [ARGS=/path/to/bin]
tqdev service stop
$(MAKE) build-tq-dev
mkdir -p "$(if $(strip $(ARGS)),$(ARGS),$(HOME)/.local/bin)"
mv ./tqdev "$(if $(strip $(ARGS)),$(ARGS),$(HOME)/.local/bin)/tqdev"
"$(if $(strip $(ARGS)),$(ARGS),$(HOME)/.local/bin)/tqdev" service start

.PHONY: dev-check
dev-check:
@command -v docker >/dev/null 2>&1 || { \
Expand Down
2 changes: 2 additions & 0 deletions docs/references/makefile.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ make run-logs
| `make install-tq-prerelease` | 最新の prerelease から `tq` と管理対象サービスの実行ファイルをインストールします。`gh` が必要です。 |
| `make install-tq-prerelease version=v0.1.0-pre.1` | 特定の prerelease タグから `tq` と管理対象サービスの実行ファイルをインストールします。 |
| `make build-tq-dev` | `dev` profile を埋め込んだ `tqdev` バイナリをカレントディレクトリに build します。 |
| `make deploy-tq-dev` | `tqdev` のサービスを停止し、`build-tq-dev` を実行して、生成された `tqdev` バイナリを `$HOME/.local/bin` に移動した後、サービスを再起動します。 |
| `make deploy-tq-dev ARGS=/path/to/bin` | 生成された `tqdev` バイナリを `$HOME/.local/bin` の代わりに指定したディレクトリへ配置します。 |

タグ、GitHub Actions、GoReleaser を含む全体の流れは [Deployment Flow](../design/deployment.ja.md) を参照してください。

Expand Down
2 changes: 2 additions & 0 deletions docs/references/makefile.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ make run-logs
| `make install-tq-prerelease` | Install `tq` and its managed service executables from the latest prerelease. Requires `gh`. |
| `make install-tq-prerelease version=v0.1.0-pre.1` | Install `tq` and its managed service executables from a specific prerelease tag. |
| `make build-tq-dev` | Build a `tqdev` binary with the `dev` profile in the current directory. |
| `make deploy-tq-dev` | Stop the `tqdev` services, run `build-tq-dev`, move the resulting `tqdev` binary to `$HOME/.local/bin`, and restart the services. |
| `make deploy-tq-dev ARGS=/path/to/bin` | Deploy the resulting `tqdev` binary to the specified directory instead of `$HOME/.local/bin`. |

See [Deployment Flow](../design/deployment.md) for the full tag, GitHub Actions, and GoReleaser flow.

Expand Down
Loading