Skip to content

Commit 9387418

Browse files
authored
Update repository.toml and root Markefile (#13)
1 parent 25580d4 commit 9387418

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

Makefile

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@ MAKEFLAGS+=--no-builtin-rules
1111
CURRENT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
1212
GIT_FOLDER=$(CURRENT_DIR)/.git
1313

14-
PROJECT_NAME=social-media
15-
STACK_NAME=social-media-plone-org-br
14+
REPOSITORY_SETTINGS := $(shell uvx repoplone settings dump)
1615

17-
VOLTO_VERSION=$(shell cat frontend/mrs.developer.json | python -c "import sys, json; print(json.load(sys.stdin)['core']['tag'])")
18-
PLONE_VERSION=$(shell cat backend/version.txt)
16+
PROJECT_NAME := $(shell echo '$(REPOSITORY_SETTINGS)' | jq -r '.name')
17+
18+
VOLTO_VERSION := $(shell echo '$(REPOSITORY_SETTINGS)' | jq -r '.frontend.volto_version')
19+
PLONE_VERSION := $(shell echo '$(REPOSITORY_SETTINGS)' | jq -r '.backend.base_package_version')
20+
21+
STACK_FILE := docker-compose-dev.yml
22+
DOCKER_COMPOSE := VOLTO_VERSION=$(VOLTO_VERSION) PLONE_VERSION=$(PLONE_VERSION) docker compose
1923

2024
# We like colors
2125
# From: https://coderwall.com/p/izxssa/colored-makefile-for-golang-projects
@@ -33,6 +37,14 @@ all: install
3337
help: ## This help message
3438
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
3539

40+
41+
.PHONY: debug-settings
42+
debug-settings: ## Debug settings
43+
@echo "Debug settings"
44+
@echo "PROJECT_NAME: $(PROJECT_NAME)"
45+
@echo "VOLTO_VERSION: $(VOLTO_VERSION)"
46+
@echo "PLONE_VERSION: $(PLONE_VERSION)"
47+
3648
###########################################
3749
# Frontend
3850
###########################################
@@ -145,28 +157,28 @@ build-images: ## Build container images
145157
.PHONY: stack-start
146158
stack-start: ## Local Stack: Start Services
147159
@echo "Start local Docker stack"
148-
VOLTO_VERSION=$(VOLTO_VERSION) PLONE_VERSION=$(PLONE_VERSION) docker compose -f docker-compose.yml up -d --build
160+
$(DOCKER_COMPOSE) -f docker-compose.yml up -d --build
149161
@echo "Now visit: http://social-media.localhost"
150162

151163
.PHONY: stack-create-site
152164
stack-create-site: ## Local Stack: Create a new site
153165
@echo "Create a new site in the local Docker stack"
154-
VOLTO_VERSION=$(VOLTO_VERSION) PLONE_VERSION=$(PLONE_VERSION) docker compose -f docker-compose.yml exec backend ./docker-entrypoint.sh create-site
166+
$(DOCKER_COMPOSE) -f docker-compose.yml exec backend ./docker-entrypoint.sh create-site
155167

156168
.PHONY: stack-status
157169
stack-status: ## Local Stack: Check Status
158170
@echo "Check the status of the local Docker stack"
159-
@docker compose -f docker-compose.yml ps
171+
$(DOCKER_COMPOSE) -f docker-compose.yml ps
160172

161173
.PHONY: stack-stop
162174
stack-stop: ## Local Stack: Stop Services
163175
@echo "Stop local Docker stack"
164-
@docker compose -f docker-compose.yml stop
176+
$(DOCKER_COMPOSE) -f docker-compose.yml stop
165177

166178
.PHONY: stack-rm
167179
stack-rm: ## Local Stack: Remove Services and Volumes
168180
@echo "Remove local Docker stack"
169-
@docker compose -f docker-compose.yml down
181+
$(DOCKER_COMPOSE) -f docker-compose.yml down
170182
@echo "Remove local volume data"
171183
@docker volume rm $(PROJECT_NAME)_vol-site-data
172184

news/+repository.internal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update repository.toml and the root Makefile. @ericof

repository.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "social-media"
33
changelog = "CHANGELOG.md"
44
version = "version.txt"
5+
container_images_prefix = "ghcr.io/plonegovbr/social-media"
56
compose = ["docker-compose.yml"]
67

78
[repository.towncrier]
@@ -11,6 +12,7 @@ settings = "towncrier.toml"
1112
[backend.package]
1213
name = "plonegovbr.socialmedia"
1314
path = "backend"
15+
code_path = "src/plonegovbr/socialmedia"
1416
changelog = "backend/CHANGELOG.md"
1517
towncrier_settings = "backend/pyproject.toml"
1618
base_package = "Products.CMFPlone"
@@ -19,6 +21,7 @@ publish = true
1921
[frontend.package]
2022
name = "@plonegovbr/volto-social-media"
2123
path = "frontend/packages/volto-social-media"
24+
code_path = "src"
2225
changelog = "frontend/packages/volto-social-media/CHANGELOG.md"
2326
towncrier_settings = "frontend/packages/volto-social-media/towncrier.toml"
2427
base_package = "@plone/volto"

0 commit comments

Comments
 (0)