From fccda215fcc4a578ce0e07e8ffd089148f7cbb66 Mon Sep 17 00:00:00 2001 From: Bane Stojkovic Date: Sun, 15 Feb 2026 22:49:47 +0100 Subject: [PATCH] release --- diylc/diylc-core/pom.xml | 2 +- .../java/org/diylc/utils/VersionReader.java | 4 +- .../diylc-core/src/main/resources/update.xml | 6 +- diylc/diylc-library/pom.xml | 2 +- diylc/diylc-swing/pom.xml | 2 +- diylc/draft-github-release.sh | 100 ++++++++++++++++++ diylc/pom.xml | 2 +- diylc/print_version.sh | 26 +++++ 8 files changed, 137 insertions(+), 7 deletions(-) create mode 100755 diylc/draft-github-release.sh create mode 100755 diylc/print_version.sh diff --git a/diylc/diylc-core/pom.xml b/diylc/diylc-core/pom.xml index b945e097..5e949d4b 100644 --- a/diylc/diylc-core/pom.xml +++ b/diylc/diylc-core/pom.xml @@ -7,7 +7,7 @@ org.diylc diylc-parent - 5.10.0 + 5.11.0 diylc-core diff --git a/diylc/diylc-core/src/main/java/org/diylc/utils/VersionReader.java b/diylc/diylc-core/src/main/java/org/diylc/utils/VersionReader.java index a69e134a..f8495f3a 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/utils/VersionReader.java +++ b/diylc/diylc-core/src/main/java/org/diylc/utils/VersionReader.java @@ -46,8 +46,8 @@ public class VersionReader { sbHtml.append(" \n"); System.out.println(sbMd.toString()); - System.out.println(); - System.out.println(sbHtml.toString()); +// System.out.println(); +// System.out.println(sbHtml.toString()); in.close(); } } catch (Exception e) { diff --git a/diylc/diylc-core/src/main/resources/update.xml b/diylc/diylc-core/src/main/resources/update.xml index 05c229c1..4203ffb5 100644 --- a/diylc/diylc-core/src/main/resources/update.xml +++ b/diylc/diylc-core/src/main/resources/update.xml @@ -346,7 +346,7 @@ 11 0 - 2026-01-20 00:00:00.000 CET + 2026-02-15 00:00:00.000 CET @@ -357,6 +357,10 @@ IMPROVEMENT Upgraded AI models for AI-powered tools and improved overall quality of the responses + + IMPROVEMENT + Windows installer prompts for installation folder instead of forcing one + IMPROVEMENT Shape components shouldn't appear in the BOM diff --git a/diylc/diylc-library/pom.xml b/diylc/diylc-library/pom.xml index 17ecfbe1..c9c5d5ac 100644 --- a/diylc/diylc-library/pom.xml +++ b/diylc/diylc-library/pom.xml @@ -7,7 +7,7 @@ org.diylc diylc-parent - 5.10.0 + 5.11.0 diylc-library diff --git a/diylc/diylc-swing/pom.xml b/diylc/diylc-swing/pom.xml index 459aac61..27b5db6e 100644 --- a/diylc/diylc-swing/pom.xml +++ b/diylc/diylc-swing/pom.xml @@ -7,7 +7,7 @@ org.diylc diylc-parent - 5.10.0 + 5.11.0 diylc-swing diff --git a/diylc/draft-github-release.sh b/diylc/draft-github-release.sh new file mode 100755 index 00000000..0359208d --- /dev/null +++ b/diylc/draft-github-release.sh @@ -0,0 +1,100 @@ +#!/bin/bash + +# Draft a GitHub release and upload build artifacts from the deploy folder. +# Requires: GitHub CLI (gh) installed and authenticated. +# +# Usage: +# ./draft-github-release.sh # use version from pom.xml, deploy/ +# ./draft-github-release.sh v1.2.3 # specific tag +# ./draft-github-release.sh v1.2.3 /path/to/deploy +# +# Prerequisites: +# - Install: https://cli.github.com/ +# - Login: gh auth login + +set -e + +PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +DEPLOY_DIR="${2:-${PROJECT_DIR}/deploy}" +TAG_OR_VERSION="${1:-}" + +# Resolve version from parent pom.xml if not provided +if [ -z "${TAG_OR_VERSION}" ]; then + if [ -f "${PROJECT_DIR}/pom.xml" ]; then + VERSION=$(sed -n 's/.*\([^<]*\)<\/version>.*/\1/p' "${PROJECT_DIR}/pom.xml" | head -1) + TAG_OR_VERSION="v${VERSION}" + else + echo "ERROR: No tag/version given and could not read pom.xml" + exit 1 + fi +fi + +# Ensure tag has v prefix for display +TAG="${TAG_OR_VERSION}" +[[ "${TAG}" != v* ]] && TAG="v${TAG}" + +echo "==========================================" +echo "Draft GitHub release and upload artifacts" +echo "==========================================" +echo "Tag: ${TAG}" +echo "Deploy dir: ${DEPLOY_DIR}" +echo "" + +if ! command -v gh &>/dev/null; then + echo "ERROR: GitHub CLI (gh) is not installed." + echo "Install: https://cli.github.com/" + exit 1 +fi + +if ! gh auth status &>/dev/null; then + echo "ERROR: Not logged in to GitHub CLI. Run: gh auth login" + exit 1 +fi + +if [ ! -d "${DEPLOY_DIR}" ]; then + echo "ERROR: Deploy directory does not exist: ${DEPLOY_DIR}" + echo "Run ./build-all-profiles.sh first (or pass the deploy path as second argument)." + exit 1 +fi + +# Collect zip and exe files +shopt -s nullglob +ZIPS=("${DEPLOY_DIR}"/*.zip) +EXES=("${DEPLOY_DIR}"/*.exe) +ARTIFACTS=("${ZIPS[@]}" "${EXES[@]}") + +if [ ${#ARTIFACTS[@]} -eq 0 ]; then + echo "ERROR: No .zip or .exe files found in ${DEPLOY_DIR}" + exit 1 +fi + +echo "Artifacts to upload (${#ARTIFACTS[@]}):" +for f in "${ARTIFACTS[@]}"; do + echo " - $(basename "$f")" +done +echo "" + +# Generate release notes using print_version.sh +NOTES_FILE="${PROJECT_DIR}/.release-notes-$$.md" +trap 'rm -f "${NOTES_FILE}"' EXIT +if [ -f "${PROJECT_DIR}/print_version.sh" ]; then + bash "${PROJECT_DIR}/print_version.sh" > "${NOTES_FILE}" || true +fi +if [ ! -s "${NOTES_FILE}" ]; then + echo "Release ${TAG}. Edit this description on GitHub before publishing." > "${NOTES_FILE}" +fi +echo "Using release notes from print_version.sh" +echo "" + +# Create draft release and upload assets in one go +# --draft: create as draft so you can edit/publish from the GitHub UI +gh release create "${TAG}" \ + --draft \ + --title "${TAG}" \ + --notes-file "${NOTES_FILE}" \ + "${ARTIFACTS[@]}" + +echo "" +echo "Done. Open the draft release on GitHub to edit notes and publish:" +echo " gh release view ${TAG} --web" +echo "" diff --git a/diylc/pom.xml b/diylc/pom.xml index 5a4560f5..32af067f 100644 --- a/diylc/pom.xml +++ b/diylc/pom.xml @@ -6,7 +6,7 @@ org.diylc diylc-parent - 5.10.0 + 5.11.0 pom DIY Layout Creator diff --git a/diylc/print_version.sh b/diylc/print_version.sh new file mode 100755 index 00000000..71f98668 --- /dev/null +++ b/diylc/print_version.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Print release notes from org.diylc.utils.VersionReader (run after build). + +PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +JAR="${PROJECT_DIR}/diylc-swing/target/diylc.jar" + +if [ ! -f "${JAR}" ]; then + exit 0 +fi + +RAW=$(java -cp "${JAR}" \ + --add-opens java.base/java.util=ALL-UNNAMED \ + --add-opens java.base/java.lang=ALL-UNNAMED \ + --add-opens java.base/java.text=ALL-UNNAMED \ + --add-opens java.desktop/java.awt=ALL-UNNAMED \ + --add-opens java.desktop/java.awt.font=ALL-UNNAMED \ + --add-opens java.desktop/java.awt.geom=ALL-UNNAMED \ + org.diylc.utils.VersionReader "${PROJECT_DIR}" 2>/dev/null) || true + +if [ -z "${RAW}" ]; then + exit 0 +fi + +# VersionReader prints Markdown changelog lines, then blank line, then HTML — keep only Markdown +echo "${RAW}" | sed '/^[[:space:]]*