trevordevore / levure

Application development framework for LiveCode
MIT License
32 stars 14 forks source link

Helper for handling release notes #28

Open trevordevore opened 7 years ago

trevordevore commented 7 years ago

It would be nice if there was a standard way of logging which changes you have made during the current development cycle. When it comes time to package the application a release notes file could be created with a list of all of the changes.

One option is to have a folder where individual files describing each change are stored. Or perhaps just a single file with a list of all changes. One approach would be a structure like this:

current.md would have the list of changes made during the current dev cycle. When you release a version then current.md would be renamed using the current version and build number. A new, empty current.md file would be created.

The format of current.md might look like this:

# Features
- A feature I added

# Changes
- A change that was made

# Bug Fixes
- A bug that was fixed

There could be an API available in the IDE for adding a release note.

appAddReleaseNote "I fixed this bug", "Bug Fixes"

macMikey commented 7 years ago

+1

trevordevore commented 7 years ago

We can make use of mergMarkdownToXHTML in the IDE to convert the notes to a format that can be displayed in a LiveCode field. Here is some markdown sample text and commands that will convert it and assign it to a field:

# Version x.x.x Change Log

## Features

The following features have been added:

- asdf
- asdf
- asdf

## Changes

The following changes have been made:

- asdf
- asdf
- asdf

## Bug Fixes

The following bugs have been fixed:

- asdf
- asdf
- asdf
on ConvertMarkdownToHTML
  -- mergMarkdownToXHTML(<pMarkdown>, [<pNoIntraEmphasis>, <pTable>, <pFencedCode>, <pAutoLink>, <pStrikethrough>, <pSpaceHeaders>, <pSuperscript>, <pLaxSpacing>])
  put mergMarkdownToXHTML(the text of fld 1, ,true, true,,, true) into tStr
  replace "<p>" with _q("<p spacebelow=`10`>") in tStr
  replace "<h1>" with _q("<p><font size=`24`><b>") in tStr
  replace "</h1>" with "</b></font></p>" in tStr
  replace "<h2>" with _q("<p spaceabove=`10` spacebelow=`10`><font size=`18`><b>") in tStr
  replace "</h2>" with "</b></font></p>" in tStr

  put "<html>" & cr & "<head>" & cr & _q("<meta charset=`UTF-8`>") & cr & "</head>" & cr & "<body>" & cr before tStr
  put "</body>" & cr & "</html>" after tStr

  set the htmltext of fld 2 to tStr

  ask file "save"
  if it is not empty then
    put textEncode(tStr, "utf8") into url("binfile:" & it)
  end if

end ConvertMarkdownToHTML

private function _q pStr
  replace "`" with quote in pStr
  return pStr
end _q
runrevmark commented 7 years ago

I'd recommend allowing change notes in distinct files which are then unified at build time. It makes having multiple working on a project easier as it minimises conflicts on otherwise common files which might have changes from multiple branches / people in your team - this is the model we use for livecode development and it works quite well, albeit requiring a little more infrastructure.

rodneytamblyn commented 3 years ago

+1

Perhaps it could be implemented in such a way as to support developer to provide a "What's new?" feature to alert users to changes - especially I'd imagine, new features. As exemplar / proof-of-concept - would be good to illustrate to user how to use e.g. through example stack / behaviour script.