Skip to content

Commit

Permalink
Fix build and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekrekr committed Dec 7, 2023
1 parent e692c8b commit df11c35
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 27 deletions.
2 changes: 1 addition & 1 deletion cli/vm/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function compile(compileConfig: dataform.ICompileConfig) {
vmIndexFileName,
'return require("@dataform/core").version || "0.0.0"'
);
if (semver.lt(dataformCoreVersion, "3.0.0")) {
if (semver.lt(dataformCoreVersion, "3.0.0-alpha.0")) {
throw new Error("@dataform/core ^3.0.0 required.");
}

Expand Down
31 changes: 10 additions & 21 deletions packages/@dataform/cli/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("//tools:ts_library.bzl", "ts_library")
load("//:version.bzl", "DF_VERSION")
load("//packages:index.bzl", "pkg_bundle", "pkg_json", "pkg_npm_tar", "add_license_header_to_file")
load("//packages:index.bzl", "LICENSE_HEADER", "add_license_header_to_file", "pkg_bundle", "pkg_json", "pkg_npm_tar")

package(default_visibility = ["//visibility:public"])

Expand Down Expand Up @@ -64,44 +64,33 @@ pkg_json(
)

pkg_bundle(
name = "bundle_no_license",
args = ["--banner='#!/usr/bin/env node'"],
entry_point = "index.ts",
name = "bundle",
allow_node_builtins = True,
args = ["--banner='#!/usr/bin/env node\n" + LICENSE_HEADER + "'"],
entry_point = "index.ts",
externals = externals,
deps = [
":cli",
],
)

pkg_bundle(
name = "worker_bundle_no_license",
args = ["--banner='#!/usr/bin/env node'"],
entry_point = "worker.ts",
name = "worker_bundle",
allow_node_builtins = True,
args = ["--banner='#!/usr/bin/env node\n" + LICENSE_HEADER + "'"],
entry_point = "worker.ts",
externals = externals,
deps = [
":cli",
],
)

add_license_header_to_file(
name="bundle_with_license",
from_file=":bundle_no_license",
to_file=":bundle.js",
)

add_license_header_to_file(
name="worker_bundle_with_license",
from_file=":worker_bundle_no_license",
to_file=":worker_bundle.js",
)

pkg_npm_tar(
name = "package",
deps = [
":bundle_with_license",
":bundle",
":package.json",
":worker_bundle_with_license",
":worker_bundle",

],
)
8 changes: 4 additions & 4 deletions packages/@dataform/core/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,20 @@ pkg_json(
"//:package.json",
"//packages/@dataform:package.layer.json",
],
main = "bundle.js.no_license",
main = "bundle.js",
version = DF_VERSION,
)

add_license_header_to_file(
name="core_proto_with_license",
from_file="//protos:core.proto",
to_file=":core.proto",
to_file="core.proto",
)

add_license_header_to_file(
name="bundle_with_license",
from_file=":bundle",
to_file=":bundle.js",
from_file="bundle",
to_file="bundle.js",
)

pkg_npm_tar(
Expand Down
2 changes: 1 addition & 1 deletion version.bzl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# NOTE: If you change the format of this line, you must change the bash command
# in /scripts/publish to extract the version string correctly.
DF_VERSION = "3.0.0"
DF_VERSION = "3.0.0-alpha.0"

0 comments on commit df11c35

Please sign in to comment.