docs: Update 4 files
Some checks failed
Build-Test-Publish / build (linux/amd64) (push) Failing after 32s
Build-Test-Publish / build (linux/arm64) (push) Failing after 39s
Build-Test-Publish / test-install-from-scratch (linux/amd64) (push) Has been skipped
Build-Test-Publish / test-install-from-scratch (linux/arm64) (push) Has been skipped
Some checks failed
Build-Test-Publish / build (linux/amd64) (push) Failing after 32s
Build-Test-Publish / build (linux/arm64) (push) Failing after 39s
Build-Test-Publish / test-install-from-scratch (linux/amd64) (push) Has been skipped
Build-Test-Publish / test-install-from-scratch (linux/arm64) (push) Has been skipped
This commit is contained in:
parent
6f525b4f6c
commit
d18f875c0e
@ -5,7 +5,8 @@ if(NOT DEFINED PROJECT_NAME)
|
||||
message(FATAL_ERROR "PROJECT_NAME is not defined. Pass it via -DPROJECT_NAME=<name>")
|
||||
endif()
|
||||
|
||||
project(${PROJECT_NAME})
|
||||
string(TIMESTAMP PROJECT_VERSION "%Y.%m%d.%H%M")
|
||||
project(${PROJECT_NAME} VERSION ${PROJECT_VERSION} LANGUAGES CXX)
|
||||
|
||||
# Build configuration
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
@ -21,6 +22,8 @@ add_executable(${PROJECT_NAME}
|
||||
src/b64ed.cpp
|
||||
)
|
||||
|
||||
# Configure version.hpp
|
||||
configure_file("src/version.hpp.in" "src/autogen/version.hpp" @ONLY)
|
||||
|
||||
# Include directories
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE
|
||||
|
@ -12,19 +12,10 @@ if [ "$ARCH" = "aarch64" ]; then
|
||||
ARCH_ALIAS="arm64"
|
||||
fi
|
||||
|
||||
# Increment version
|
||||
VERSION_FILE="${SCRIPT_DIR}/src/version.h"
|
||||
if [ ! -f "${VERSION_FILE}" ]; then
|
||||
echo "${VERSION_FILE} not found!" >&2
|
||||
exit 1
|
||||
else
|
||||
v=$(cat "${VERSION_FILE}" | grep -o 'static const char \*VERSION = "[0-9.]*";' | cut -d'"' -f2)
|
||||
oldv=$v
|
||||
v=$((v+1))
|
||||
echo "Incrementing version from $oldv to $v" >&2
|
||||
echo "static const char *VERSION = \"$v\";" > "${VERSION_FILE}"
|
||||
fi
|
||||
TAG="v$v"
|
||||
# Get version from CMake timestamp
|
||||
VERSION=$(date +"%Y.%m%d.%H%M")
|
||||
TAG="v$VERSION"
|
||||
echo "Building version $VERSION" >&2
|
||||
|
||||
# build release version
|
||||
export CMAKE_BUILD_TYPE="Release"
|
||||
@ -149,7 +140,7 @@ for FILE in ${PROJECT}.${ARCH_ALIAS} ${PROJECT}.${ARCH} install.sh; do
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Published bb64 version $v to $REPO_URL (tag $TAG) with binaries for $ARCH_ALIAS / $ARCH."
|
||||
echo "Published bb64 version $VERSION to $REPO_URL (tag $TAG) with binaries for $ARCH_ALIAS / $ARCH."
|
||||
|
||||
|
||||
#--------------------------------------------------------------------------------
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <cstring>
|
||||
#include <sstream>
|
||||
#include <filesystem>
|
||||
#include "version.h"
|
||||
#include "version.hpp"
|
||||
#include "b64ed.hpp"
|
||||
|
||||
// Recursively decode and print if nested bb64 command is found
|
||||
|
@ -1 +0,0 @@
|
||||
static const char *VERSION = "39";
|
1
bb64/src/version.hpp.in
Normal file
1
bb64/src/version.hpp.in
Normal file
@ -0,0 +1 @@
|
||||
static const char *VERSION = "@PROJECT_VERSION@";
|
Loading…
x
Reference in New Issue
Block a user