Compare commits

...

2 Commits

Author SHA1 Message Date
Mathis HERRIOT
2450977e61 chore(versioning): bump package versions to 0.1.0 across all modules
Some checks failed
CI/CD Pipeline / Valider backend (push) Failing after 1m12s
CI/CD Pipeline / Valider documentation (push) Successful in 1m41s
CI/CD Pipeline / Valider frontend (push) Successful in 1m43s
CI/CD Pipeline / Déploiement en Production (push) Has been skipped
2026-01-20 12:00:35 +01:00
Mathis HERRIOT
afc18b555a chore(versioning): improve version script with enhanced validation and refactored command handling 2026-01-20 11:57:24 +01:00
5 changed files with 43 additions and 38 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@memegoat/backend",
"version": "0.0.1",
"version": "0.1.0",
"description": "",
"author": "",
"private": true,

View File

@@ -1,6 +1,6 @@
{
"name": "@memegoat/documentation",
"version": "0.0.1",
"version": "0.1.0",
"private": true,
"scripts": {
"build": "next build",

View File

@@ -1,6 +1,6 @@
{
"name": "@memegoat/frontend",
"version": "0.0.1",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",

View File

@@ -1,6 +1,6 @@
{
"name": "@memegoat/source",
"version": "0.0.1",
"version": "0.1.0",
"description": "",
"scripts": {
"version:get": "cmake -P version.cmake GET",

View File

@@ -17,10 +17,13 @@ endfunction()
# Fonction pour incrémenter la version SemVer
function(increment_version CURRENT_VERSION TYPE OUT_VAR)
string(REPLACE "." ";" VERSION_LIST ${CURRENT_VERSION})
list(GET VERSION_LIST 0 MAJOR)
list(GET VERSION_LIST 1 MINOR)
list(GET VERSION_LIST 2 PATCH)
if(CURRENT_VERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)")
set(MAJOR ${CMAKE_MATCH_1})
set(MINOR ${CMAKE_MATCH_2})
set(PATCH ${CMAKE_MATCH_3})
else()
message(FATAL_ERROR "Format de version invalide: ${CURRENT_VERSION}. Attendu: X.Y.Z")
endif()
if("${TYPE}" STREQUAL "MAJOR")
math(EXPR MAJOR "${MAJOR} + 1")
@@ -70,11 +73,12 @@ function(set_new_version NEW_VERSION)
endif()
endforeach()
# Demander à l'utilisateur s'il veut tagger (ou le faire par défaut si spécifié)
# Créer le tag git
create_git_tag(${NEW_VERSION})
endfunction()
# Logique principale
if(CMAKE_SCRIPT_MODE_FILE STREQUAL CMAKE_CURRENT_LIST_FILE)
set(ARG_OFFSET 0)
while(ARG_OFFSET LESS CMAKE_ARGC)
if("${CMAKE_ARGV${ARG_OFFSET}}" STREQUAL "-P")
@@ -107,3 +111,4 @@ elseif("${COMMAND}" MATCHES "^(PATCH|MINOR|MAJOR)$")
else()
message(FATAL_ERROR "Commande inconnue: ${COMMAND}. Utilisez GET, SET, PATCH, MINOR ou MAJOR.")
endif()
endif()