Release: fix missing target and remove dist
Signed-off-by: faumaray <faumaray@gmail.com>
This commit is contained in:
1 parent
46ff4068cf
commit
1698c9c434
1 file changed
+41
@@ -0,0 +1,41 @@
|
||||
#include "echoion/standalone/UpdateBuildDefaults.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <string_view>
|
||||
|
||||
#ifndef ECHOION_EXPECTED_RUNTIME_VERSION
|
||||
#error "ECHOION_EXPECTED_RUNTIME_VERSION must be defined by CMake"
|
||||
#endif
|
||||
|
||||
namespace
|
||||
{
|
||||
bool check(bool condition, std::string_view message)
|
||||
{
|
||||
if (!condition) {
|
||||
std::cerr << "FAILED: " << message << '\n';
|
||||
}
|
||||
return condition;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
int main()
|
||||
{
|
||||
namespace Defaults = Echoion::Standalone::UpdateBuildDefaults;
|
||||
|
||||
bool passed = true;
|
||||
passed &=
|
||||
check(Defaults::RuntimeVersion == ECHOION_EXPECTED_RUNTIME_VERSION,
|
||||
"generated runtime version does not match the configured release "
|
||||
"version");
|
||||
passed &=
|
||||
check(!Defaults::ApiVersion.empty(), "generated API version is empty");
|
||||
passed &= check(!Defaults::ToolchainAbi.empty(),
|
||||
"generated toolchain ABI is empty");
|
||||
passed &=
|
||||
check(Defaults::PublicKeysJson.size() >= 2 &&
|
||||
Defaults::PublicKeysJson.front() == '[' &&
|
||||
Defaults::PublicKeysJson.back() == ']',
|
||||
"generated update public-key configuration is not a JSON array");
|
||||
|
||||
return passed ? 0 : 1;
|
||||
}
|
||||
Reference in new issue
Block a user