Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ desired behavior.
Please check out the [Getting Started](GETTING_STARTED.md) guide.

# Release notes
## Release notes for 3.8.9

### New Features

Bugs addressed in this release:

* [#692](../../issues/692) CalChart Windows Field Thumbnails Appear Incorrectly
* [#694](../../issues/694) Calchart ignoring reference points/transitions

Other changes:

## Release notes for 3.8.8

### New Features
Expand Down
6 changes: 3 additions & 3 deletions RELEASE_INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Checklist

CalChart uses CMake and Github actions to automate the release process. When you push a tag for the repository, github will build and package the release.

The current calchart version is 3.8.8. In all commands below, substitute that number for `$CCVER` (meaning when you read `$CCVER`, type 3.8.8). When incrementing, be sure to consider if it's time to bump the MINOR version. Only do that if there's incompatibilities, such as a new feature that won't work on a previous version of CalChart.
The current calchart version is 3.8.9. In all commands below, substitute that number for `$CCVER` (meaning when you read `$CCVER`, type 3.8.9). When incrementing, be sure to consider if it's time to bump the MINOR version. Only do that if there's incompatibilities, such as a new feature that won't work on a previous version of CalChart.

1. Create a git branch to prep the changes: `git checkout -b dev/prep_$CCVER`

Expand All @@ -32,8 +32,8 @@ awk '//; /^# Release notes/{while(getline<"LATEST_RELEASE_NOTES.md"){print}}' RE
6. Tag the depot

```
$ git tag -a v3.8.8 -m "calchart-3.8.8"
$ git push origin v3.8.8
$ git tag -a v3.8.9 -m "calchart-3.8.9"
$ git push origin v3.8.9
```

This should trigger the github action, which should publish release notes in Draft form.
Expand Down
5 changes: 5 additions & 0 deletions ccvers.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@

#include <cstdint>

// clang-format off
#define CC_MAJOR_VERSION @CalChart_VERSION_MAJOR@
#define CC_MINOR_VERSION @CalChart_VERSION_MINOR@
#define CC_PATCH_VERSION @CalChart_VERSION_PATCH@
// clang-format on

#define STRINGIZE_HELPER(name) #name
#define STRINGIZE(x) STRINGIZE_HELPER(x)
Expand All @@ -30,6 +32,9 @@
#define CC_VERSION \
MK_CC_VERSION(CC_MAJOR_VERSION, CC_MINOR_VERSION, CC_PATCH_VERSION)

// Full git version including commit hash (e.g., "v3.6.2-48-g6538532")
#define CC_GIT_VERSION "@CalChart_GIT_VERSION@"

static constexpr uint32_t kVersion = (CC_MAJOR_VERSION << 8) | CC_MINOR_VERSION;

namespace {
Expand Down
45 changes: 33 additions & 12 deletions cmake/version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,43 @@

# This will produce a string of the form v3.6.2-48-g6538532
# which is the tag plus number of changes since the tag if any
execute_process(COMMAND git describe --tags
execute_process(COMMAND git describe --tags --always --dirty
OUTPUT_VARIABLE GIT_VERS
OUTPUT_STRIP_TRAILING_WHITESPACE
)

# Save the full git version for diagnostic purposes
set (CalChart_GIT_VERSION "${GIT_VERS}")

# decompose the tag string into: 'v' Major '.' Minor '.' Patch
string(STRIP ${GIT_VERS} GIT_VERS)
string(SUBSTRING ${GIT_VERS} 1 -1 GIT_VERS)
string(FIND ${GIT_VERS} "." bound)
string(SUBSTRING ${GIT_VERS} 0 ${bound} Found_MAJOR)
string(SUBSTRING ${GIT_VERS} ${bound} -1 GIT_VERS)
string(SUBSTRING ${GIT_VERS} 1 -1 GIT_VERS)
string(FIND ${GIT_VERS} "." bound)
string(SUBSTRING ${GIT_VERS} 0 ${bound} Found_MINOR)
string(SUBSTRING ${GIT_VERS} ${bound} -1 GIT_VERS)
string(SUBSTRING ${GIT_VERS} 1 -1 GIT_VERS)
set (Found_PATCH ${GIT_VERS})
# Strip the leading 'v' if present
set (GIT_VERS_STRIPPED "${GIT_VERS}")
if (GIT_VERS_STRIPPED MATCHES "^v")
string(SUBSTRING ${GIT_VERS_STRIPPED} 1 -1 GIT_VERS_STRIPPED)
endif()

# Extract major version
string(FIND ${GIT_VERS_STRIPPED} "." bound)
if (bound GREATER -1)
string(SUBSTRING ${GIT_VERS_STRIPPED} 0 ${bound} Found_MAJOR)
string(SUBSTRING ${GIT_VERS_STRIPPED} ${bound} -1 GIT_VERS_STRIPPED)
string(SUBSTRING ${GIT_VERS_STRIPPED} 1 -1 GIT_VERS_STRIPPED)
else()
set(Found_MAJOR 0)
endif()

# Extract minor version
string(FIND ${GIT_VERS_STRIPPED} "." bound)
if (bound GREATER -1)
string(SUBSTRING ${GIT_VERS_STRIPPED} 0 ${bound} Found_MINOR)
string(SUBSTRING ${GIT_VERS_STRIPPED} ${bound} -1 GIT_VERS_STRIPPED)
string(SUBSTRING ${GIT_VERS_STRIPPED} 1 -1 GIT_VERS_STRIPPED)
else()
set(Found_MINOR 0)
endif()

# Rest is patch (may include -commits-ghash)
set (Found_PATCH ${GIT_VERS_STRIPPED})

set (CalChart_VERSION_MAJOR ${Found_MAJOR})
set (CalChart_VERSION_MINOR ${Found_MINOR})
Expand Down
4 changes: 2 additions & 2 deletions core/CalChartDiagnosticInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ auto DiagnosticInfo::Create() -> DiagnosticInfo
{
auto info = DiagnosticInfo{};

// CalChart version from ccvers.h
info.calchart_version = CC_VERSION;
// CalChart version from ccvers.h (includes git hash)
info.calchart_version = CC_GIT_VERSION;

// Build type
#ifdef NDEBUG
Expand Down
2 changes: 1 addition & 1 deletion src/CalChartFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ CalChartFrame::CalChartFrame(wxDocument* doc, wxView* view, CalChart::Configurat

// Give it a status line
CreateStatusBar(3);
SetStatusText("Welcome to Calchart " CC_VERSION);
SetStatusText("Welcome to Calchart " CC_GIT_VERSION);

wxUI::MenuProxy editMenu;
wxUI::MenuBar{
Expand Down
4 changes: 2 additions & 2 deletions src/CalChartSplash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ CalChartSplash::CalChartSplash(wxDocManager* manager, wxFrame* frame, std::strin
wxUI::VSizer{
BasicSizerFlags(),
wxUI::Bitmap{ BitmapWithBandIcon(GetLogoSize()) }.withFlags(ExpandSizerFlags()),
wxUI::Text{ "CalChart " CC_VERSION }
wxUI::Text{ "CalChart " CC_GIT_VERSION }
.withFont(fontTitle),
wxUI::Text{ std::string{ "Built with: " } + wxString{ wxVERSION_STRING }.ToStdString() }
.withFont(fontSubTitle),
Expand Down Expand Up @@ -188,7 +188,7 @@ void CalChartSplash::About()
{
// clang-format off
(void)wxMessageBox(
"CalChart " CC_VERSION "\n"
"CalChart " CC_GIT_VERSION "\n"
"Built with: " wxVERSION_STRING "\n"
"Authors: Gurk Meeker, Richard Michael Powell\n"
"\n"
Expand Down
2 changes: 1 addition & 1 deletion tools/calchart_cmd/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ constexpr auto USAGE =
--version Show version.
)";

constexpr auto version = "calchart_cmd " CC_VERSION;
constexpr auto version = "calchart_cmd " CC_GIT_VERSION;

void PrintToPS(std::string_view showPath, bool landscape, bool cont, bool contsheet, bool overview, std::string_view outfile)
{
Expand Down
Loading