This commit is contained in:
Bane Stojkovic
2026-02-15 22:49:47 +01:00
parent d89061b355
commit fccda215fc
8 changed files with 137 additions and 7 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
<parent>
<groupId>org.diylc</groupId>
<artifactId>diylc-parent</artifactId>
<version>5.10.0</version>
<version>5.11.0</version>
</parent>
<artifactId>diylc-core</artifactId>
@@ -46,8 +46,8 @@ public class VersionReader {
sbHtml.append(" </release>\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) {
@@ -346,7 +346,7 @@
<minor>11</minor>
<build>0</build>
</versionNumber>
<releaseDate>2026-01-20 00:00:00.000 CET</releaseDate>
<releaseDate>2026-02-15 00:00:00.000 CET</releaseDate>
<name></name>
<changes>
<org.diylc.appframework.update.Change>
@@ -357,6 +357,10 @@
<changeType>IMPROVEMENT</changeType>
<description>Upgraded AI models for AI-powered tools and improved overall quality of the responses</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType>
<description>Windows installer prompts for installation folder instead of forcing one</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType>
<description>Shape components shouldn't appear in the BOM</description>
+1 -1
View File
@@ -7,7 +7,7 @@
<parent>
<groupId>org.diylc</groupId>
<artifactId>diylc-parent</artifactId>
<version>5.10.0</version>
<version>5.11.0</version>
</parent>
<artifactId>diylc-library</artifactId>
+1 -1
View File
@@ -7,7 +7,7 @@
<parent>
<groupId>org.diylc</groupId>
<artifactId>diylc-parent</artifactId>
<version>5.10.0</version>
<version>5.11.0</version>
</parent>
<artifactId>diylc-swing</artifactId>
+100
View File
@@ -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>\([^<]*\)<\/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 ""
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>org.diylc</groupId>
<artifactId>diylc-parent</artifactId>
<version>5.10.0</version>
<version>5.11.0</version>
<packaging>pom</packaging>
<name>DIY Layout Creator</name>
+26
View File
@@ -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:]]*</,$d'