release: v0.1.5 — test VPN, journal 15 j + verdicts par application, page À propos refondue, Makefile Féalu
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6086e8aeff
commit
790397da0e
15 files changed
+637
-180
No files matched your search
@@ -15,38 +15,54 @@ GITEA_REPO_NAME := DataControl
|
||||
GITEA_TOKEN ?= $(shell sed -n 's/^giteaToken=//p' gitea-token.properties 2>/dev/null | tr -d '[:space:]')
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
.PHONY: help build release install push version-bump changelog clean tag _check-token _check-apk publish deploy
|
||||
|
||||
## help: Show this help message
|
||||
help:
|
||||
@echo "DataControl v$(VERSION_NAME) (build $(VERSION_CODE))"
|
||||
@echo ""
|
||||
@echo "Available targets:"
|
||||
@grep -E '^## [a-z]' Makefile | sed 's/## / make /' | column -t -s ':'
|
||||
BOLD := \033[1m
|
||||
DIM := \033[2m
|
||||
CYAN := \033[36m
|
||||
GREEN := \033[32m
|
||||
YELLOW := \033[33m
|
||||
RESET := \033[0m
|
||||
|
||||
help:
|
||||
@printf "\n"
|
||||
@printf " $(BOLD)$(CYAN)DataControl$(RESET) $(DIM)— pare-feu de données mobiles et contrôle parental Android $(RESET)$(DIM)(v$(VERSION_NAME), build $(VERSION_CODE))$(RESET)\n"
|
||||
@printf "\n"
|
||||
@printf " $(BOLD)🔨 Build & installation$(RESET)\n"
|
||||
@printf " $(GREEN)make build$(RESET) 🔨 Construire l'APK debug\n"
|
||||
@printf " $(GREEN)make release$(RESET) 📱 Construire l'APK release et le copier à la racine\n"
|
||||
@printf " $(GREEN)make install$(RESET) 📲 Installer l'APK debug sur l'appareil connecté\n"
|
||||
@printf "\n"
|
||||
@printf " $(BOLD)🚀 Versions & publication$(RESET)\n"
|
||||
@printf " $(GREEN)make version-bump$(RESET) 🔖 Incrémenter versionCode et le patch de versionName\n"
|
||||
@printf " $(GREEN)make changelog$(RESET) 📝 Ajouter au CHANGELOG les commits depuis le dernier tag\n"
|
||||
@printf " $(GREEN)make push$(RESET) 📤 Commit, tag et push de la version courante\n"
|
||||
@printf " $(GREEN)make tag$(RESET) 📌 Créer et pousser le tag git de la version courante\n"
|
||||
@printf " $(GREEN)make publish$(RESET) 🚀 Publier l'APK signé en Release Gitea (idempotent)\n"
|
||||
@printf " $(GREEN)make deploy$(RESET) 🚢 Construire l'APK release puis le publier\n"
|
||||
@printf "\n"
|
||||
@printf " $(BOLD)🧹 Nettoyage$(RESET)\n"
|
||||
@printf " $(GREEN)make clean$(RESET) 🧽 Supprimer les artefacts de build et les APK racine\n"
|
||||
@printf "\n"
|
||||
|
||||
## build: Build debug APK
|
||||
build:
|
||||
@echo "[BUILD] Building debug APK..."
|
||||
@printf "$(YELLOW)🔨 Construction de l'APK debug...$(RESET)\n"
|
||||
$(GRADLEW) assembleDebug
|
||||
@echo "[BUILD] Done: $(APK_DEBUG)"
|
||||
|
||||
## release: Build release APK and copy to project root
|
||||
release:
|
||||
@echo "[RELEASE] Building release APK for v$(VERSION_NAME) ($(VERSION_CODE))..."
|
||||
@printf "$(YELLOW)📱 Construction de l'APK release v$(VERSION_NAME) (build $(VERSION_CODE))...$(RESET)\n"
|
||||
$(GRADLEW) assembleRelease
|
||||
@cp $(APK_RELEASE) $(OUTPUT_APK)
|
||||
@echo "[RELEASE] Done: $(OUTPUT_APK)"
|
||||
|
||||
## install: Install debug APK on connected device
|
||||
install:
|
||||
@echo "[INSTALL] Installing debug APK..."
|
||||
@printf "$(YELLOW)📲 Installation de l'APK debug...$(RESET)\n"
|
||||
$(GRADLEW) installDebug
|
||||
@echo "[INSTALL] Done."
|
||||
|
||||
## push: Git add, commit, tag and push (uses current version)
|
||||
push:
|
||||
@echo "[PUSH] Committing and pushing v$(VERSION_NAME)..."
|
||||
@printf "$(YELLOW)📤 Commit et push de v$(VERSION_NAME)...$(RESET)\n"
|
||||
git add -A
|
||||
git commit -m "Release v$(VERSION_NAME) (build $(VERSION_CODE))"
|
||||
git tag -a "v$(VERSION_NAME)" -m "Release v$(VERSION_NAME)"
|
||||
@@ -54,8 +70,8 @@ push:
|
||||
git push origin "v$(VERSION_NAME)"
|
||||
@echo "[PUSH] Done."
|
||||
|
||||
## tag: Create and push the git tag for the current version
|
||||
tag:
|
||||
@printf "$(YELLOW)📌 Tag git v$(VERSION_NAME)...$(RESET)\n"
|
||||
@if git rev-parse "v$(VERSION_NAME)" >/dev/null 2>&1; then \
|
||||
echo "Tag v$(VERSION_NAME) already exists, skipping"; \
|
||||
else \
|
||||
@@ -76,9 +92,8 @@ _check-apk:
|
||||
@test $(OUTPUT_APK) -nt version.properties || \
|
||||
(echo "$(OUTPUT_APK) is older than version.properties — rerun 'make release'." && exit 1)
|
||||
|
||||
## publish: Publish the signed APK as a Gitea Release (tag + assets, idempotent)
|
||||
publish: _check-apk _check-token tag
|
||||
@echo "Publishing Gitea release v$(VERSION_NAME)…"
|
||||
@printf "$(YELLOW)🚀 Publication de la release Gitea v$(VERSION_NAME)...$(RESET)\n"
|
||||
@EXISTING=$$(curl -s -H "Authorization: token $(GITEA_TOKEN)" \
|
||||
"$(GITEA_URL)/api/v1/repos/$(GITEA_OWNER)/$(GITEA_REPO_NAME)/releases/tags/v$(VERSION_NAME)"); \
|
||||
REL_ID=$$(printf '%s\n' "$$EXISTING" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['id'] if isinstance(d, dict) and 'id' in d else '')" 2>/dev/null); \
|
||||
@@ -113,11 +128,11 @@ publish: _check-apk _check-token tag
|
||||
echo ""; \
|
||||
echo "$(GITEA_URL)/$(GITEA_OWNER)/$(GITEA_REPO_NAME)/releases/tag/v$(VERSION_NAME)"
|
||||
|
||||
## deploy: Build the signed APK then publish (commit source changes first!)
|
||||
deploy: release publish
|
||||
@printf "$(GREEN)🚢 Déploiement terminé.$(RESET)\n"
|
||||
|
||||
## version-bump: Increment versionCode and update versionName patch
|
||||
version-bump:
|
||||
@printf "$(YELLOW)🔖 Incrémentation de la version...$(RESET)\n"
|
||||
@NEW_CODE=$$(( $(VERSION_CODE) + 1 )); \
|
||||
PATCH=$$(echo $(VERSION_NAME) | cut -d. -f3); \
|
||||
MAJOR=$$(echo $(VERSION_NAME) | cut -d. -f1); \
|
||||
@@ -128,9 +143,8 @@ version-bump:
|
||||
sed -i "s/versionCode=.*/versionCode=$${NEW_CODE}/" version.properties; \
|
||||
echo "[VERSION-BUMP] Bumped to $${NEW_VERSION} (build $${NEW_CODE})"
|
||||
|
||||
## changelog: Generate a changelog entry from git log since last tag
|
||||
changelog:
|
||||
@echo "[CHANGELOG] Generating entries since last tag..."
|
||||
@printf "$(YELLOW)📝 Génération du CHANGELOG depuis le dernier tag...$(RESET)\n"
|
||||
@LAST_TAG=$$(git describe --tags --abbrev=0 2>/dev/null || echo ""); \
|
||||
if [ -z "$$LAST_TAG" ]; then \
|
||||
git log --oneline --pretty=format:"- %s" >> CHANGELOG.md; \
|
||||
@@ -141,9 +155,8 @@ changelog:
|
||||
fi; \
|
||||
echo "[CHANGELOG] Done."
|
||||
|
||||
## clean: Clean build artifacts
|
||||
clean:
|
||||
@echo "[CLEAN] Cleaning build artifacts..."
|
||||
@printf "$(YELLOW)🧽 Nettoyage des artefacts de build...$(RESET)\n"
|
||||
$(GRADLEW) clean
|
||||
@rm -f DataControl-*.apk
|
||||
@echo "[CLEAN] Done."
|
||||
Reference in new issue
Block a user