File tree Expand file tree Collapse file tree 7 files changed +56
-5
lines changed Expand file tree Collapse file tree 7 files changed +56
-5
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,12 @@ build --enable_runfiles
6
6
7
7
build:windows --platforms=//bazel/platforms:windows
8
8
build:windows --host_platform=//bazel/platforms:windows
9
+ build:windows --workspace_status_command=bazel/tools/wsc.cmd
9
10
10
11
build:linux --platforms=//bazel/platforms:linux
11
12
build:linux --host_platform=//bazel/platforms:linux
12
13
build:linux --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux
14
+ build:linux --workspace_status_command=bazel/tools/wsc.sh
13
15
14
16
common:ci --announce_rc
15
17
common:ci --disk_cache=~/.cache/bazel-disk-cache
Original file line number Diff line number Diff line change 28
28
key : ${{runner.os}}-bazel-cache
29
29
- uses : actions/checkout@v3
30
30
- run : bazel build --config=ci ...
31
+ build-windows :
32
+ runs-on : windows-latest
33
+ steps :
34
+ - uses : actions/cache@v3
35
+ with :
36
+ path : |
37
+ /Users/runneradmin/AppData/Local/bazelisk
38
+ /Users/runneradmin/.cache/bazel-disk-cache
39
+ key : ${{runner.os}}-bazel-cache
40
+ - uses : actions/checkout@v3
41
+ - run : bazel build --config=ci //...
31
42
check-dist :
32
43
runs-on : ubuntu-latest
33
44
steps :
Original file line number Diff line number Diff line change @@ -52,6 +52,13 @@ load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
52
52
53
53
rules_pkg_dependencies ()
54
54
55
+ http_archive (
56
+ name = "rules_cc_stamp" ,
57
+ strip_prefix = "rules_cc_stamp-63d4861f4d420b574fa0f112599aae2b8aee785e" ,
58
+ urls = ["https://github.com/zaucy/rules_cc_stamp/archive/63d4861f4d420b574fa0f112599aae2b8aee785e.zip" ],
59
+ sha256 = "f469a3b97eeabeb850c655f59ea17799ff40badd3a0b3e9de38534c89ad2f87d" ,
60
+ )
61
+
55
62
http_archive (
56
63
name = "ecsact_si_wasm" ,
57
64
sha256 = "4153154fd80e2cd48ddd8e0d0c208691f134b33d5c67dc6fc081b3f77149b2c2" ,
@@ -188,9 +195,9 @@ bazel_skylib_workspace()
188
195
189
196
http_archive (
190
197
name = "rules_blender" ,
191
- sha256 = "1ae03c77c6e41b90904296f8d6269c3de9ffa12d0faef997a50e4edb225ef64c " ,
192
- strip_prefix = "rules_blender-6f17aa27b6d76ecda9df0dab2be61adc2bc11c61 " ,
193
- urls = ["https://github.com/zaucy/rules_blender/archive/6f17aa27b6d76ecda9df0dab2be61adc2bc11c61 .zip" ],
198
+ sha256 = "734b08d1f0eb29a09f81509803cc324c2012a09f47e692a13c41af1370fcb648 " ,
199
+ strip_prefix = "rules_blender-ef5c746f0ef3e9b8523175bed4ac8e8157fe0be3 " ,
200
+ urls = ["https://github.com/zaucy/rules_blender/archive/ef5c746f0ef3e9b8523175bed4ac8e8157fe0be3 .zip" ],
194
201
)
195
202
196
203
load ("@rules_blender//:repo.bzl" , "blender_repository" )
Original file line number Diff line number Diff line change
1
+ @ echo off
2
+
3
+ if " %GITHUB_REF% " == " " (
4
+ for /f %%i in ('git describe --tags --abbrev^ =0') do (
5
+ set GITHUB_REF = %%i
6
+ )
7
+ )
8
+
9
+ echo STABLE_ECSACT_SDK_VERSION %GITHUB_REF%
10
+
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -e
4
+
5
+ if [[ -z " ${GITHUB_REF} " ]]; then
6
+ echo " STABLE_ECSACT_SDK_VERSION $( git describe --tags --abbrev=0) "
7
+ else
8
+ echo " STABLE_ECSACT_SDK_VERSION ${GITHUB_REF} "
9
+ fi
10
+
Original file line number Diff line number Diff line change 1
1
load ("@rules_cc//cc:defs.bzl" , "cc_binary" )
2
+ load ("@rules_cc_stamp//:index.bzl" , "cc_stamp_header" )
2
3
load ("//bazel:copts.bzl" , "copts" )
3
4
4
5
package (default_visibility = ["//visibility:public" ])
5
6
7
+ cc_stamp_header (
8
+ name = "bazel_stamp_header" ,
9
+ out = "bazel_stamp_header.hh" ,
10
+ )
11
+
6
12
cc_binary (
7
13
name = "ecsact" ,
8
- srcs = ["cli.cc" ],
14
+ srcs = ["cli.cc" , "bazel_stamp_header.hh" ],
9
15
copts = copts ,
16
+ stamp = 1 ,
10
17
deps = [
11
18
"//cli/commands:codegen" ,
12
19
"//cli/commands:command" ,
Original file line number Diff line number Diff line change 3
3
#include < string>
4
4
#include < string_view>
5
5
#include < unordered_map>
6
+ #include " cli/bazel_stamp_header.hh"
6
7
7
8
#include " ./commands/command.hh"
8
9
#include " ./commands/codegen.hh"
@@ -25,9 +26,9 @@ constexpr auto USAGE = R"(Ecsact SDK Command Line
25
26
26
27
Usage:
27
28
ecsact (--help | -h)
29
+ ecsact (--version | -v)
28
30
ecsact config ([<options>...] | --help)
29
31
ecsact codegen ([<options>...] | --help)
30
-
31
32
)" ;
32
33
33
34
std::string colorize_logo () {
@@ -74,6 +75,9 @@ int main(int argc, char* argv[]) {
74
75
if (command == " -h" || command == " --help" ) {
75
76
print_usage ();
76
77
return 0 ;
78
+ } else if (command == " -v" || command == " --version" ) {
79
+ std::cout << STABLE_ECSACT_SDK_VERSION << " \n " ;
80
+ return 0 ;
77
81
} else if (command.starts_with (' -' )) {
78
82
std::cerr << " Expected subcommand and instead got '" << command << " '\n " ;
79
83
print_usage ();
You can’t perform that action at this time.
0 commit comments