diff --git a/.gitea/workflows/auto-tag-develop.yml b/.gitea/workflows/auto-tag-develop.yml index 5bb4ac5..48f28d5 100644 --- a/.gitea/workflows/auto-tag-develop.yml +++ b/.gitea/workflows/auto-tag-develop.yml @@ -16,30 +16,50 @@ jobs: token: ${{ secrets.RELEASE_TOKEN }} persist-credentials: true - - name: Create next tag v0.0.X + - name: Create next tag from config/version.yaml shell: bash run: | set -euo pipefail - # Skip if current commit already has a v0.0.* tag - if git tag --points-at HEAD | grep -qE '^v0\.0\.'; then + # Skip if current commit already has a vX.Y.Z tag + if git tag --points-at HEAD | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+$'; then echo "Tag already exists on this commit. Skipping." exit 0 fi - last_tag="$(git tag -l 'v0.0.*' --sort=-v:refname | head -n1 || true)" - if [ -z "$last_tag" ]; then - next_tag="v0.0.1" - else - patch="${last_tag##v0.0.}" - if ! [[ "$patch" =~ ^[0-9]+$ ]]; then - echo "Unexpected tag format: $last_tag" >&2 - exit 1 - fi - next_tag="v0.0.$((patch + 1))" + changed_version=false + if git diff --name-only "${{ gitea.event.before }}" "${{ gitea.event.after }}" | grep -q '^config/version\.yaml$'; then + changed_version=true fi - git config user.name "gitea-actions" - git config user.email "gitea-actions@local" - git tag "$next_tag" - git push origin "$next_tag" + read_version() { + awk -F': *' '/app\.version:/{print $2}' config/version.yaml | tr -d '[:space:]' | tr -d "'\"" + } + + if $changed_version; then + version="$(read_version)" + if ! [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Invalid version in version.yaml: $version" >&2 + exit 1 + fi + else + last_tag="$(git tag -l 'v*' --sort=-v:refname | head -n1 || true)" + if [ -z "$last_tag" ]; then + version="0.1.0" + else + base="${last_tag#v}" + IFS='.' read -r major minor patch <<< "$base" + version="${major}.${minor}.$((patch + 1))" + fi + + printf "parameters:\\n app.version: '%s'\\n" "$version" > config/version.yaml + git config user.name "gitea-actions" + git config user.email "gitea-actions@local" + git add config/version.yaml + git commit -m "chore: bump version to v$version" || true + git push origin develop || true + fi + + tag="v$version" + git tag "$tag" + git push origin "$tag" diff --git a/.idea/copilot.data.migration.agent.xml b/.idea/copilot.data.migration.agent.xml new file mode 100644 index 0000000..4ea72a9 --- /dev/null +++ b/.idea/copilot.data.migration.agent.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/copilot.data.migration.ask.xml b/.idea/copilot.data.migration.ask.xml new file mode 100644 index 0000000..7ef04e2 --- /dev/null +++ b/.idea/copilot.data.migration.ask.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/copilot.data.migration.ask2agent.xml b/.idea/copilot.data.migration.ask2agent.xml new file mode 100644 index 0000000..1f2ea11 --- /dev/null +++ b/.idea/copilot.data.migration.ask2agent.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/copilot.data.migration.edit.xml b/.idea/copilot.data.migration.edit.xml new file mode 100644 index 0000000..8648f94 --- /dev/null +++ b/.idea/copilot.data.migration.edit.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml index 0b73c9c..4fee92a 100644 --- a/.idea/dataSources.xml +++ b/.idea/dataSources.xml @@ -5,7 +5,7 @@ postgresql true org.postgresql.Driver - jdbc:postgresql://localhost:5433/ferme + jdbc:postgresql://localhost:5432/ferme $ProjectFileDir$ @@ -16,4 +16,4 @@ $ProjectFileDir$ - \ No newline at end of file + diff --git a/.idea/data_source_mapping.xml b/.idea/data_source_mapping.xml deleted file mode 100644 index 248117a..0000000 --- a/.idea/data_source_mapping.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/ferme.iml b/.idea/ferme.iml index 5065845..9cfc341 100644 --- a/.idea/ferme.iml +++ b/.idea/ferme.iml @@ -154,6 +154,7 @@ + diff --git a/.idea/php.xml b/.idea/php.xml index fbd036e..a081fbb 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -4,12 +4,25 @@ - - - - - - @@ -733,11 +769,50 @@ - - + + + + + file://$PROJECT_DIR$/src/Entity/ReceptionPelletBuilding.php + 6 + + + file://$PROJECT_DIR$/src/Entity/Shipment.php + 6 + + + file://$PROJECT_DIR$/frontend/services/dto/shipment-data.ts + + + file://$PROJECT_DIR$/frontend/layouts/default.vue + 72 + + +