Skip to content

Add version to Makefile #110

@KillWolfVlad

Description

@KillWolfVlad

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions