mirror of
https://github.com/allankoechke/jwt-cpp.git
synced 2026-11-30 10:18:40 +00:00
* add reflect json traits * jwt-cpp defaults * fix clang tidy warnings * fix clang tidy warnings * rename directory * add tests * add tests * add tests * replace unnecessary copy with move * gate reflect cpp tests behind flag * reflect cpp CI work * reflect-cpp example * reflect-cpp CI * reflect-cpp CI * match naming + update ci * first pass code review * linter * linter * align naming * make file +x * align target name fix order or targets in tests * fix typo * Fix target_link_libraries syntax for jwt-cpp * cleanup example code * add reflect-json to coverage tests --------- Co-authored-by: Ali Girayhan Ozbay <aligirayhan.ozbay@abex.capital> Co-authored-by: Ali Girayhan Özbay <aligirayhan@ozbay.org>
49 lines
1.2 KiB
Bash
Executable File
49 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Install reflect-cpp library with specified version
|
|
|
|
set -e # Exit on error
|
|
|
|
# Check if version is provided
|
|
if [[ -z "$1" ]] || [[ "$1" == "-h" ]] || [[ "$1" == "--help" ]]; then
|
|
echo "Usage: $0 VERSION"
|
|
echo ""
|
|
echo "Install reflect-cpp library"
|
|
echo ""
|
|
echo "Arguments:"
|
|
echo " VERSION reflect-cpp version to install (required)"
|
|
echo ""
|
|
echo "Examples:"
|
|
echo " $0 0.24.0"
|
|
exit 1
|
|
fi
|
|
|
|
# Configuration
|
|
reflectcpp_VERSION="$1"
|
|
INSTALL_DIR="/tmp"
|
|
BUILD_DIR="${INSTALL_DIR}/reflect-cpp-${reflectcpp_VERSION}"
|
|
|
|
echo "Installing reflectcpp v${reflectcpp_VERSION}..."
|
|
|
|
# Download
|
|
echo "Downloading reflectcpp v${reflectcpp_VERSION}..."
|
|
cd "${INSTALL_DIR}"
|
|
wget -q "https://github.com/getml/reflect-cpp/archive/v${reflectcpp_VERSION}.tar.gz"
|
|
|
|
# Extract
|
|
echo "Extracting archive..."
|
|
tar -zxf "v${reflectcpp_VERSION}.tar.gz"
|
|
|
|
# Build and install
|
|
echo "Building and installing..."
|
|
cd "${BUILD_DIR}"
|
|
cmake . -DCMAKE_BUILD_TYPE=Release -DREFLECTCPP_INSTALL=ON
|
|
cmake --build .
|
|
sudo cmake --install .
|
|
|
|
# Cleanup
|
|
echo "Cleaning up..."
|
|
rm -f "${INSTALL_DIR}/v${reflectcpp_VERSION}.tar.gz"
|
|
rm -rf "${BUILD_DIR}"
|
|
|
|
echo "✓ reflect-cpp v${reflectcpp_VERSION} installed successfully!"
|