Skip to content

Commit

Permalink
Save git version in save file. Fixes #1280
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Sep 25, 2021
1 parent 611991a commit 568a870
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib/core/document/DocumentSerialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <core/document/DocumentView.hpp>
#include <core/presenter/DocumentManager.hpp>

#include <score_git_info.hpp>

#include <QApplication>
#include <QByteArray>
#include <QCryptographicHash>
Expand Down Expand Up @@ -88,6 +90,12 @@ void Document::saveAsJson(JSONObject::Serializer& writer)
writer.stream.Int(
context().app.applicationSettings.saveFormatVersion.value());

writer.stream.Key("Commit");
writer.stream.String(GIT_COMMIT);

writer.stream.Key("Tag");
writer.stream.String(SCORE_TAG_NO_V);

writer.stream.EndObject();
// Indicate in the stack that the current position is saved
m_commandStack.markCurrentIndexAsSaved();
Expand Down

0 comments on commit 568a870

Please sign in to comment.