1
0
mirror of https://github.com/minio/minio-cpp.git synced 2025-04-18 08:24:00 +03:00

Version bump to 0.2.0 (#126)

Co-authored-by: Petr Kobalicek <petr.kobalicek@min.io>
This commit is contained in:
Petr Kobalicek 2024-03-28 15:06:35 +01:00 committed by GitHub
parent 1e5f140159
commit 2132b812e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 92 additions and 9 deletions

View File

@ -17,11 +17,19 @@ permissions:
jobs:
coding-style:
name: "Coding Style Check"
name: "Coding Style & Version Check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout minio-cpp
uses: actions/checkout@v4
with:
path: "minio-cpp"
- name: "Python"
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies if Ubuntu
run: |
@ -31,10 +39,15 @@ jobs:
sudo apt-get -qy install clang-format-18
clang-format-18 --version
- name: Version Check
shell: bash
working-directory: minio-cpp
run: python check-version.py
- name: Coding Style Check
shell: bash
run: |
CLANG_FORMAT=clang-format-18 ./check-style.sh
working-directory: minio-cpp
run: CLANG_FORMAT=clang-format-18 ./check-style.sh
build:
strategy:

View File

@ -22,7 +22,7 @@ cmake_policy(SET CMP0091 NEW)
# -----------------
set(MINIO_CPP_MAJOR_VERSION "0")
set(MINIO_CPP_MINOR_VERSION "1")
set(MINIO_CPP_MINOR_VERSION "2")
set(MINIO_CPP_PATCH_VERSION "0")
set(MINIO_CPP_VERSION_STRING "${MINIO_CPP_MAJOR_VERSION}.${MINIO_CPP_MINOR_VERSION}.${MINIO_CPP_PATCH_VERSION}")

View File

@ -76,7 +76,7 @@ $ ./configure.sh -DMINIO_CPP_TEST=ON
## Example:: file-uploader.cc
```c++
#include <client.h>
#include <miniocpp/client.h>
int main(int argc, char* argv[]) {
// Create S3 base URL.

70
check-version.py Executable file
View File

@ -0,0 +1,70 @@
#!/usr/bin/env python3
# MinIO C++ Library for Amazon S3 Compatible Cloud Storage
# Copyright 2022-2024 MinIO, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
import json
import os
import re
import sys
ROOT_PATH = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))
def read_text_file(file_name):
with open(file_name, "r", encoding="utf-8") as f:
return f.read()
def read_vcpkg_version():
package = json.loads(read_text_file(os.path.join(ROOT_PATH, "vcpkg.json")))
return package["version"]
def read_cmake_version():
content = read_text_file(os.path.join(ROOT_PATH, "CMakeLists.txt"))
major = re.search("set\\(MINIO_CPP_MAJOR_VERSION \"(\\d+)\"\\)", content)
minor = re.search("set\\(MINIO_CPP_MINOR_VERSION \"(\\d+)\"\\)", content)
patch = re.search("set\\(MINIO_CPP_PATCH_VERSION \"(\\d+)\"\\)", content)
return "{}.{}.{}".format(major[1], minor[1], patch[1])
def read_source_version():
content = read_text_file(os.path.join(ROOT_PATH, "include", "miniocpp", "config.h"))
major = re.search("#define MINIO_CPP_MAJOR_VERSION (\\d+)", content)
minor = re.search("#define MINIO_CPP_MINOR_VERSION (\\d+)", content)
patch = re.search("#define MINIO_CPP_PATCH_VERSION (\\d+)", content)
return "{}.{}.{}".format(major[1], minor[1], patch[1])
def main():
vcpkg_version = read_vcpkg_version()
cmake_version = read_cmake_version()
source_version = read_source_version()
if source_version == vcpkg_version and source_version == cmake_version:
print("minio-cpp version {} is set correctly in all required files".format(source_version))
else:
print("Versions don't match [source={} vcpkg={} cmake={}]\n".format(source_version, vcpkg_version, cmake_version))
print("When increasing a version, please make sure that all of the above have the same value!\n")
print("Versions can be found in the following files:")
print(" * include/miniocpp/config.h")
print(" * CMakeLists.txt")
print(" * vcpkg.json")
sys.exit(1)
if __name__ == "__main__":
main()

View File

@ -21,8 +21,8 @@
#define MINIO_CPP_STRINGIFY(x) #x
#define MINIO_CPP_MAJOR_VERSION 0
#define MINIO_CPP_MINOR_VERSION 1
#define MINIO_CPP_PATCH_VERSION 1
#define MINIO_CPP_MINOR_VERSION 2
#define MINIO_CPP_PATCH_VERSION 0
#define MINIO_CPP_VERSION \
"" MINIO_CPP_STRINGIFY(MINIO_CPP_MAJOR_VERSION) "." MINIO_CPP_STRINGIFY( \

View File

@ -1,6 +1,6 @@
{
"name": "minio-cpp",
"version": "0.1.1",
"version": "0.2.0",
"description": "The MinIO C++ Client SDK provides simple APIs to access any Amazon S3 compatible object storage",
"homepage": "https://github.com/minio/minio-cpp",
"license": "Apache-2.0",