Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version to Makefile #110

Open
KillWolfVlad opened this issue Jan 30, 2023 · 0 comments
Open

Add version to Makefile #110

KillWolfVlad opened this issue Jan 30, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@KillWolfVlad
Copy link
Collaborator

KillWolfVlad commented Jan 30, 2023

Example

BUILDER_IMAGE=$(DOCKER_HUB_LOCAL)/node:18.18.2-bullseye

define docker-inside-node
	docker run \
		--rm -t \
		-u root \
		-v $(PWD):/app \
		-w /app \
		-e CI=true \
		$(BUILDER_IMAGE) \
		sh -x -c "$(strip $(1))"
endef
################################################################################
.PHONY: version
version:
	$(call docker-inside-node, yarn version $(VERSION) -i)
################################################################################
.PHONY: build-app
build-app:
	$(call docker-inside-node, yarn install --immutable)
	$(call docker-inside-node, yarn run build)
################################################################################
.PHONY: build-image
build-image:
	@docker build -t ${IMAGE_NAME}:${IMAGE_TAG} \
		-f Dockerfile .
################################################################################
.PHONY: test
test:
	$(call docker-inside-node, yarn run test:cov)
################################################################################
.PHONY: lint
lint:
	$(call docker-inside-node, yarn run lint)
@KillWolfVlad KillWolfVlad added the enhancement New feature or request label Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant