generate release notes of the appdata automatically

This commit is contained in:
Martin Marmsoler 2022-05-23 18:52:35 +02:00
parent 96702f3b96
commit afb6768523
3 changed files with 24 additions and 29 deletions

View File

@ -0,0 +1,6 @@
# add release notes to the appdata file
file(READ "${CHANGELOG_HTML}" HTML_CHANGELOGS)
string(REPLACE "\n" "\n\t" RELEASES ${HTML_CHANGELOGS}) # add tabulator
string(REGEX REPLACE "<h3>(v[1-9]\\.[0-9]\\.[0-9]) - ([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9])<\\/h3>" "<release version='\\1' date='\\2'>" RELEASES ${RELEASES})
string(REGEX REPLACE "<hr \\/>" "</release>" RELEASES ${RELEASES})
configure_file(${APPDATA_CONF} ${APPDATA})

View File

@ -46,35 +46,7 @@
</provides>
<releases>
<release version="V1.1.0" date="2022-04-30">
<description>
<ul>
<li>Button to directly access the terminal and the filebrowser</li>
<li>Add support for running in single instance mode</li>
<li>Customizable hotkeys</li>
<li>Quick commit author overriding</li>
<li>keyboard-interactive SSH auth</li>
<li>Improved single line staging and replacing staging image to a more appropriate one</li>
<li>Font customizing</li>
<li>Options to switch between staging/unstaging treeview, single tree view and list view</li>
<li>Do not automatically abort rebase if conflicts occur</li>
<li>Add possibility to save file of any version on local system</li>
<li>Add possibility to open a file of any version with default editor</li>
</ul>
</description>
</release>
<release version="V1.0.0" date="2021-11-18">
<description>
<ul>
<li>Staging of single lines</li>
<li>Double tree view: Seeing staged and unstaged changes in different trees.</li>
<li>Maximize History or Diff view by pressing Ctrl+M</li>
<li>Ignore Pattern: Ability to ignore all files defined by a pattern instead of only one file</li>
<li>Tag Viewer: When creating a new tag all available tags are visible. Makes it easier to create consistent tags.</li>
<li>Commit Message template: Making it easier to write template based commit messages.</li>
</ul>
</description>
</release>
@RELEASES@
</releases>
<content_rating type="oars-1.1">

View File

@ -1,6 +1,8 @@
set(CONF_DIR ${CMAKE_SOURCE_DIR}/conf)
set(RSRC_DIR ${CMAKE_SOURCE_DIR}/rsrc)
option(GENERATE_APPDATA "Create appdata/metadata file" OFF)
if(APPLE)
set(ICON ${RSRC_DIR}/Gittyup.icns)
set(APP_IMPL_FILE Application_mac.mm)
@ -33,6 +35,10 @@ set(CHANGELOG_HTML ${DOC_BINARY_DIR}/changelog.html)
set(ACKNOWLEDGMENTS_HTML ${DOC_BINARY_DIR}/acknowledgments.html)
set(PRIVACY_HTML ${DOC_BINARY_DIR}/privacy.html)
set(PLUGIN_HTML ${DOC_BINARY_DIR}/plugin.html)
set(APPDATA_CONF
${CMAKE_SOURCE_DIR}/rsrc/linux/com.github.Murmele.Gittyup.appdata.xml.conf)
set(APPDATA
${CMAKE_BINARY_DIR}/rsrc/linux/com.github.Murmele.Gittyup.appdata.xml)
add_custom_command(
OUTPUT ${CHANGELOG_HTML} ${ACKNOWLEDGMENTS_HTML} ${PRIVACY_HTML}
${PLUGIN_HTML}
@ -83,6 +89,17 @@ add_executable(
${PRIVACY_HTML}
${PLUGIN_HTML})
if(GENERATE_APPDATA)
add_custom_command(
TARGET gittyup
COMMAND
${CMAKE_COMMAND} -DCHANGELOG_HTML:STRING=${CHANGELOG_HTML} -
DAPPDATA_CONF:STRING=${APPDATA_CONF} -DAPPDATA:STRING=${APPDATA} -P
"${CMAKE_SOURCE_DIR}/cmake/generate_appdata.cmake" DEPENDS
${CHANGELOG_HTML}
COMMENT "Create appdata file")
endif()
target_link_libraries(gittyup app)
set_target_properties(