${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \
-- env HOST="$HOST" \
DISTNAME="$DISTNAME" \
- RELEASE="$RELEASE" \
JOBS="$JOBS" \
+ VERSION="$VERSION" \
+ COMMIT="$COMMIT" \
+ TAG="$TAG" \
COMMIT_TIMESTAMP="${COMMIT_TIMESTAMP:?unable to determine value}" \
${V:+V=1} \
${SOURCES_PATH:+SOURCES_PATH="$SOURCES_PATH"} \
Required environment variables as seen inside the container:
DIST_ARCHIVE_BASE: ${DIST_ARCHIVE_BASE:?not set}
DISTNAME: ${DISTNAME:?not set}
- RELEASE: ${RELEASE:?not set}
+ VERSION: ${VERSION:?not set}
+ COMMIT: ${COMMIT:?not set}
HOST: ${HOST:?not set}
COMMIT_TIMESTAMP: ${COMMIT_TIMESTAMP:?not set}
JOBS: ${JOBS:?not set}
# Set appropriate CMake options for build type
CMAKEVARS="-DWITH_SCANNER=On -DCHECK_UPDATES=On -DSELF_CONTAINED=On -DDONATE_BEG=On -DFEATHER_TARGET_TRIPLET=${HOST} -DWITH_PLUGIN_REDDIT=Off"
+
+ if [[ -n "${TAG}" ]]; then
+ CMAKEVARS+=" -DOFFICIAL_BUILD=On"
+ fi
+
ANONDIST=""
case "$HOST" in
*mingw32)
esac
# Code-signing
- if [ "$RELEASE" -ne 0 ]; then
- case "$HOST" in
- *darwin*)
- signapple apply Feather.app "/distsrc/external/feather-codesigning/signatures/${HOST}/Feather.app"
- ;;
- esac
+ if [[ -n "${TAG}" ]]; then
+ if [[ "${TAG}" != *"-rc"* ]]; then
+ case "$HOST" in
+ *darwin*)
+ signapple apply Feather.app "/distsrc/external/feather-codesigning/signatures/${HOST}/Feather.app"
+ ;;
+ esac
+ fi
fi
# Finally, deterministically produce {non-,}debug binary tarballs ready
# Set common variables
################
-VERSION="${FORCE_VERSION:-$(git_head_version)}"
+COMMIT="$(git_head_commit)"
+TAG="$(git_head_tag)"
+
+if [[ -n "${TAG}" ]]; then
+ VERSION="${TAG}"
+else
+ VERSION="${COMMIT}"
+fi
+
+VERSION="${FORCE_VERSION:-${VERSION}}"
DISTNAME="${DISTNAME:-feather-${VERSION}}"
-RELEASE="$(is_release)"
VERSION_BASE_DIR="${VERSION_BASE_DIR:-${PWD}}"
version_base_prefix="${VERSION_BASE_DIR}/guix/guix-build-"
git rev-parse --show-toplevel 2> /dev/null
}
-git_head_version() {
- local recent_tag
- if recent_tag="$(git describe --exact-match HEAD 2> /dev/null)"; then
- echo "${recent_tag%-rc}"
- else
- git rev-parse --short=12 HEAD
- fi
+git_head_commit() {
+ git rev-parse --short=12 HEAD
}
-is_release() {
- local recent_tag
- if recent_tag="$(git describe --exact-match HEAD 2> /dev/null)"; then
- if [[ "$recent_tag" == *"-rc" ]]; then
- echo -n "0"
- fi
- echo -n "1"
- else
- echo -n "0"
- fi
+git_head_tag() {
+ echo -n $(git describe --exact-match HEAD 2> /dev/null)
}
target_compile_definitions(feather PRIVATE STATIC=1)
endif()
+if(OFFICIAL_BUILD)
+ target_compile_definitions(feather PRIVATE OFFICIAL_BUILD=1)
+endif()
+
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(feather PRIVATE QT_NO_DEBUG=1)
endif()
ui->aboutImage->setPixmap(p.scaled(128, 128, Qt::KeepAspectRatio, Qt::SmoothTransformation));
auto about = Utils::fileOpenQRC(":assets/about.txt");
auto about_text = Utils::barrayToString(about);
- about_text = about_text.replace("<feather_version>", FEATHER_VERSION);
+ about_text = about_text.replace("<feather_version>", Utils::getVersion());
ui->copyrightText->setPlainText(about_text);
auto ack = Utils::fileOpenQRC(":assets/ack.txt");
else
torStatus = "Unknown";
- ui->label_featherVersion->setText(QString("%1").arg(FEATHER_VERSION));
+ ui->label_featherVersion->setText(Utils::getVersion());
ui->label_walletHeight->setText(QString::number(m_wallet->blockChainHeight()));
ui->label_daemonHeight->setText(QString::number(m_wallet->daemonBlockChainHeight()));
#include <QStandardPaths>
#include <QProcess>
+#include "config-feather.h"
#include "constants.h"
#include "networktype.h"
#include "utils/ColorScheme.h"
return "Synchronized";
}
+
+QString getVersion() {
+ QString version = QString("%1").arg(FEATHER_VERSION);
+#ifdef OFFICIAL_BUILD
+ version += " (release)";
+#endif
+ return version;
+}
}
void clearLayout(QLayout *layout, bool deleteWidgets = true);
QString formatSyncStatus(quint64 height, quint64 target, bool daemonSync = false);
+
+ QString getVersion();
}
#endif //FEATHER_UTILS_H