From fa89bd3cbba52c160954278828ecd80c10aa3a48 Mon Sep 17 00:00:00 2001 From: Michal Cieslar Date: Sat, 28 Dec 2024 21:39:02 +0100 Subject: [PATCH 1/2] fix: fix bazel build --- .github/workflows/linux-bazel-build.yml | 2 +- BUILD.bazel | 4 ++-- CMakeLists.txt | 2 +- src/modules/internet.cpp | 2 -- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linux-bazel-build.yml b/.github/workflows/linux-bazel-build.yml index e717a11da..16f2ab312 100644 --- a/.github/workflows/linux-bazel-build.yml +++ b/.github/workflows/linux-bazel-build.yml @@ -40,7 +40,7 @@ jobs: ${{ runner.os }}- - name: Build faker-cxx library - run: bazel build //:faker-cxx + run: bazel build //:faker-cxx --enable_workspace - name: Build faker-cxx examples and run run: | diff --git a/BUILD.bazel b/BUILD.bazel index f04b82ce7..e22b57ced 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -16,10 +16,10 @@ genrule( outs = ["include/faker-cxx/version.h"], cmd = """ echo "#pragma once" > $@ - echo '#define FAKER_CXX_VERSION_MAJOR 2' >> $@ + echo '#define FAKER_CXX_VERSION_MAJOR 3' >> $@ echo '#define FAKER_CXX_VERSION_MINOR 0' >> $@ echo '#define FAKER_CXX_VERSION_PATCH 0' >> $@ - echo '#define FAKER_CXX_VERSION "2.0.0"' >> $@ + echo '#define FAKER_CXX_VERSION "3.0.0"' >> $@ """, ) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b4ce67ab..3ed47e8fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.22) project(faker-cxx LANGUAGES CXX - VERSION 2.0.0 + VERSION 3.0.0 DESCRIPTION "C++ Faker library for generating fake (but realistic) data." HOMEPAGE_URL "https://github.com/cieslarmichal/faker-cxx") diff --git a/src/modules/internet.cpp b/src/modules/internet.cpp index 07ef976ec..94049cd41 100644 --- a/src/modules/internet.cpp +++ b/src/modules/internet.cpp @@ -418,8 +418,6 @@ unsigned port() std::string url(const WebProtocol& webProtocol, Locale locale) { - const auto& internetDefinition = getInternetDefinition(locale); - const auto protocolStr = webProtocol == WebProtocol::Https ? "https" : "http"; return common::format("{}://{}", protocolStr, domainName(locale)); From 15610af8099a16fa2c3c4920aebd9dd659e42726 Mon Sep 17 00:00:00 2001 From: Michal Cieslar Date: Sat, 28 Dec 2024 21:42:18 +0100 Subject: [PATCH 2/2] fix: fix bazel build v2 --- .github/workflows/linux-bazel-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux-bazel-build.yml b/.github/workflows/linux-bazel-build.yml index 16f2ab312..2ade494dd 100644 --- a/.github/workflows/linux-bazel-build.yml +++ b/.github/workflows/linux-bazel-build.yml @@ -44,12 +44,12 @@ jobs: - name: Build faker-cxx examples and run run: | - bazel build //examples:faker-cxx-basic-example - bazel build //examples:faker-cxx-person-example + bazel build //examples:faker-cxx-basic-example --enable_workspace + bazel build //examples:faker-cxx-person-example --enable_workspace bazel-bin/examples/faker-cxx-person-example bazel-bin/examples/faker-cxx-basic-example - name: Build faker-cxx tests and validate run: | - bazel build //tests:faker-cxx-ut + bazel build //tests:faker-cxx-ut --enable_workspace bazel-bin/tests/faker-cxx-ut