mirror of
https://github.com/bonfire-networks/bonfire-app.git
synced 2024-05-17 00:22:40 +00:00
messctl wrapper in makefile
This commit is contained in:
parent
8857d10e23
commit
bbd5aecd6e
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -41,3 +41,4 @@ npm-debug.log
|
|||
|
||||
# user-local overrides for mess
|
||||
deps.path
|
||||
/libs/
|
|
@ -24,7 +24,7 @@ RUN apk add cmake make gcc libc-dev
|
|||
# dependency manager
|
||||
RUN git clone https://github.com/commonspub/messctl.git priv/messctl/origin
|
||||
# precompile Rust deps
|
||||
RUN cd priv/messctl && cargo init && mkdir .cargo && cp origin/Cargo.* . && cargo vendor > .cargo/config
|
||||
RUN cd priv/messctl && cargo init && mkdir .cargo && cp origin/Cargo.* . && cargo build
|
||||
# compile messctl
|
||||
RUN cd priv/messctl && cp -r origin/* . && cargo build --release && cargo install --path . --verbose
|
||||
# install
|
||||
|
|
37
Makefile
37
Makefile
|
@ -1,5 +1,7 @@
|
|||
.PHONY: setup updates db-reset build dev shell
|
||||
|
||||
LIBS_PATH=./libs/
|
||||
|
||||
mix-%: ## Run a specific mix command, eg: `make mix-deps.get` or make mix-deps.update args="pointers"
|
||||
docker-compose run web mix $* $(args)
|
||||
|
||||
|
@ -15,8 +17,39 @@ build: ## Build the docker image
|
|||
shell: ## Open a shell, in dev mode
|
||||
docker-compose run --service-ports web bash
|
||||
|
||||
dep-%: ## Run a specific messctl command, eg: `make dep-help` or make dep-add args="pointers"
|
||||
docker-compose run --service-ports web messctl $* $(args)
|
||||
dep-hex-%: ## add/enable/disable/delete a hex dep with messctl command, eg: `make dep-hex-enable dep=pointers version="~> 0.2"
|
||||
docker-compose run web messctl $* $(dep) $(version) deps.hex
|
||||
|
||||
dep-git-%: ## add/enable/disable/delete a git dep with messctl command, eg: `make dep-hex-enable dep=pointers repo=https://github.com/commonspub/pointers#main
|
||||
docker-compose run web messctl $* $(dep) $(repo) deps.git
|
||||
|
||||
dep-local-%: ## add/enable/disable/delete a local dep with messctl command, eg: `make dep-hex-enable dep=pointers path=./libs/pointers
|
||||
docker-compose run web messctl $* $(dep) $(path) deps.path
|
||||
|
||||
dep-clone-local: ## Clone a git dep and use the local version, eg: make dep-clone-local dep="pointers" repo=https://github.com/commonspub/pointers
|
||||
git clone $(repo) $(LIBS_PATH)$(dep) 2> /dev/null || (cd $(LIBS_PATH)$(dep) ; git pull)
|
||||
make dep-go-local dep=$(dep)
|
||||
|
||||
dep-go-local: ## Switch to using a standard local path, eg: make dep-go-local dep=pointers
|
||||
make dep-go-local-path dep=$(dep) path=$(LIBS_PATH)$(dep)
|
||||
|
||||
dep-go-local-path: ## Switch to using a local path, eg: make dep-go-local dep=pointers path=./libs/pointers
|
||||
make dep-local-add dep=$(dep) path=$(path)
|
||||
make dep-local-enable dep=$(dep) path=""
|
||||
make dep-git-disable dep=$(dep) repo=""
|
||||
make dep-hex-disable dep=$(dep) version=""
|
||||
|
||||
dep-go-git: ## Switch to using a git repo, eg: make dep-go-git dep="pointers" repo=https://github.com/commonspub/pointers (repo is optional if previously specified)
|
||||
make dep-git-add dep=$(dep) $(repo) 2> /dev/null || true
|
||||
make dep-git-enable dep=$(dep) repo=""
|
||||
make dep-hex-disable dep=$(dep) version=""
|
||||
make dep-local-disable dep=$(dep) path=""
|
||||
|
||||
dep-go-hex: ## Switch to using a library from hex.pm, eg: make dep-go-hex dep="pointers" version="~> 0.2" (version is optional if previously specified)
|
||||
make dep-hex-add dep=$(dep) version=$(version) 2> /dev/null || true
|
||||
make dep-hex-enable dep=$(dep) version=""
|
||||
make dep-git-disable dep=$(dep) repo=""
|
||||
make dep-local-disable dep=$(dep) path=""
|
||||
|
||||
dev: ## Run the app with Docker
|
||||
docker-compose run --service-ports web
|
||||
|
|
2
deps.git
2
deps.git
|
@ -4,7 +4,7 @@ pointers = "https://github.com/commonspub/pointers#main"
|
|||
cpub_local_auth = "https://github.com/commonspub/cpub_local_auth#main"
|
||||
cpub_accounts = "https://github.com/commonspub/cpub_accounts#main"
|
||||
cpub_emails = "https://github.com/commonspub/cpub_emails#main"
|
||||
cpub_users = "https://github.com/commonspub/cpub_users#main"
|
||||
# cpub_users = "https://github.com/commonspub/cpub_users#main"
|
||||
cpub_profiles = "https://github.com/commonspub/cpub_profiles#main"
|
||||
cpub_characters = "https://github.com/commonspub/cpub_characters#main"
|
||||
# cpub_circles = "https://github.com/commonspub/cpub_circles#main"
|
||||
|
|
Loading…
Reference in a new issue