Skip to content

Commit

Permalink
fix: fix bazel build (#1021)
Browse files Browse the repository at this point in the history
* fix: fix bazel build

* fix: fix bazel build v2
  • Loading branch information
cieslarmichal authored Dec 28, 2024
1 parent ebfc441 commit 4349ae9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/linux-bazel-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ 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: |
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
4 changes: 2 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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"' >> $@
""",
)

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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")

Expand Down
2 changes: 0 additions & 2 deletions src/modules/internet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 4349ae9

Please sign in to comment.