@@ -14,7 +14,7 @@ def build_stackql(verbose :bool) -> int:
1414 os .environ ['BUILDMINORVERSION' ] = os .environ .get ('BUILDMINORVERSION' , '1' )
1515 os .environ ['BUILDPATCHVERSION' ] = os .environ .get ('BUILDPATCHVERSION' , '1' )
1616 os .environ ['CGO_ENABLED' ] = os .environ .get ('CGO_ENABLED' , '1' )
17- rv = subprocess .call (
17+ return subprocess .call (
1818 f'go build { "-x -v" if verbose else "" } --tags "sqlite_stackql" -ldflags "-X github.com/stackql/stackql/internal/stackql/cmd.BuildMajorVersion={ os .environ .get ("BUILDMAJORVERSION" )} '
1919 f'-X github.com/stackql/stackql/internal/stackql/cmd.BuildMinorVersion={ os .environ .get ("BUILDMINORVERSION" )} '
2020 f'-X github.com/stackql/stackql/internal/stackql/cmd.BuildPatchVersion={ os .environ .get ("BUILDPATCHVERSION" )} '
@@ -26,8 +26,12 @@ def build_stackql(verbose :bool) -> int:
2626 '-o build/ ./stackql' ,
2727 shell = True
2828 )
29- if rv != 0 :
30- return rv
29+
30+ def build_stackql_mcp_client (verbose :bool ) -> int :
31+ os .environ ['BUILDMAJORVERSION' ] = os .environ .get ('BUILDMAJORVERSION' , '1' )
32+ os .environ ['BUILDMINORVERSION' ] = os .environ .get ('BUILDMINORVERSION' , '1' )
33+ os .environ ['BUILDPATCHVERSION' ] = os .environ .get ('BUILDPATCHVERSION' , '1' )
34+ os .environ ['CGO_ENABLED' ] = os .environ .get ('CGO_ENABLED' , '1' )
3135 return subprocess .call (
3236 'go build '
3337 f'{ "-x -v" if verbose else "" } '
@@ -73,6 +77,7 @@ def main():
7377 parser = argparse .ArgumentParser ()
7478 parser .add_argument ('--verbose' , action = 'store_true' )
7579 parser .add_argument ('--build' , action = 'store_true' )
80+ parser .add_argument ('--build-mcp-client' , action = 'store_true' )
7681 parser .add_argument ('--test' , action = 'store_true' )
7782 parser .add_argument ('--robot-test' , action = 'store_true' )
7883 parser .add_argument ('--robot-test-integration' , action = 'store_true' )
@@ -83,6 +88,10 @@ def main():
8388 ret_code = build_stackql (args .verbose )
8489 if ret_code != 0 :
8590 exit (ret_code )
91+ if args .build_mcp_client :
92+ ret_code = build_stackql_mcp_client (args .verbose )
93+ if ret_code != 0 :
94+ exit (ret_code )
8695 if args .test :
8796 ret_code = unit_test_stackql (args .verbose )
8897 if ret_code != 0 :
0 commit comments