Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ workspace(name = "angular_material")
# Add nodejs rules
http_archive(
name = "build_bazel_rules_nodejs",
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.6.0.zip",
strip_prefix = "rules_nodejs-0.6.0",
sha256 = "e8a2bb5ca51fbafb244bc507bcebcae33a63d969f47413b319a8dcce032845bf",
url = "https://github.com/bazelbuild/rules_nodejs/archive/99166f8eb7fc628ca561acf9f9a51a1c26edadad.zip",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need this labelled? 0.7.0 was from Friday and should have what you need

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't really need to be, I can update it next time around

strip_prefix = "rules_nodejs-99166f8eb7fc628ca561acf9f9a51a1c26edadad",
sha256 = "338e8495e5d1fa16de7190106c5675372ff4a347f6004e203e84a168db96281e",
)

# NOTE: this rule installs nodejs, npm, and yarn, but does NOT install
Expand All @@ -28,9 +28,9 @@ sass_repositories()
# Add TypeScript rules
http_archive(
name = "build_bazel_rules_typescript",
url = "https://github.com/bazelbuild/rules_typescript/archive/df4a1a561d88e187438ac7791a5ac33995f2d317.zip",
strip_prefix = "rules_typescript-df4a1a561d88e187438ac7791a5ac33995f2d317",
sha256 = "51a84f156eeddf126e9370b5c193b4709eeb330448e2de5afcda40232e0b56bc",
url = "https://github.com/bazelbuild/rules_typescript/archive/0.11.1.zip",
strip_prefix = "rules_typescript-0.11.1",
sha256 = "7406bea7954e1c906f075115dfa176551a881119f6820b126ea1eacb09f34a1a",
)

# Setup TypeScript Bazel workspace
Expand Down
88 changes: 44 additions & 44 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
"node": ">= 5.4.1"
},
"dependencies": {
"@angular/animations": "6.0.0-rc.1",
"@angular/common": "6.0.0-rc.1",
"@angular/compiler": "6.0.0-rc.1",
"@angular/core": "6.0.0-rc.1",
"@angular/forms": "6.0.0-rc.1",
"@angular/platform-browser": "6.0.0-rc.1",
"@angular/animations": "6.0.0-rc.3",
"@angular/common": "6.0.0-rc.3",
"@angular/compiler": "6.0.0-rc.3",
"@angular/core": "6.0.0-rc.3",
"@angular/forms": "6.0.0-rc.3",
"@angular/platform-browser": "6.0.0-rc.3",
"core-js": "^2.4.1",
"rxjs": "6.0.0-rc.0",
"systemjs": "0.19.43",
Expand All @@ -42,13 +42,13 @@
"devDependencies": {
"@angular-devkit/core": "^0.4.5",
"@angular-devkit/schematics": "^0.4.5",
"@angular/bazel": "6.0.0-rc.1",
"@angular/compiler-cli": "6.0.0-rc.1",
"@angular/http": "6.0.0-rc.1",
"@angular/platform-browser-dynamic": "6.0.0-rc.1",
"@angular/platform-server": "6.0.0-rc.1",
"@angular/router": "6.0.0-rc.1",
"@angular/upgrade": "6.0.0-rc.1",
"@angular/bazel": "6.0.0-rc.3",
"@angular/compiler-cli": "6.0.0-rc.3",
"@angular/http": "6.0.0-rc.3",
"@angular/platform-browser-dynamic": "6.0.0-rc.3",
"@angular/platform-server": "6.0.0-rc.3",
"@angular/router": "6.0.0-rc.3",
"@angular/upgrade": "6.0.0-rc.3",
"@bazel/ibazel": "0.3.1",
"@google-cloud/storage": "^1.1.1",
"@schematics/angular": "^0.4.5",
Expand Down
35 changes: 16 additions & 19 deletions src/lib/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,20 @@ sass_bundle(
output_name = "_theming.scss",
)

# TODO(jelbourn): uncomment when 6.0.0-rc.1 comes out
# Creates the @angular/material package published to npm.
#ng_package(
# name = "npm_package",
# srcs = [
# "package.json",
# ],
# entry_point = "src/lib/public_api.js",
# entry_point_name = "material",
# globals = ROLLUP_GLOBALS,
# data = [
# ":theming_bundle",
# "//src/lib/prebuilt-themes:indigo-pink",
# "//src/lib/prebuilt-themes:deeppurple-amber",
# "//src/lib/prebuilt-themes:pink-bluegrey",
# "//src/lib/prebuilt-themes:purple-green",
# ],
# packages = ["//src/lib/schematics:npm_package"],
# deps = MATERIAL_TARGETS
#)
ng_package(
name = "npm_package",
srcs = ["package.json"],
entry_point = "src/lib/public_api.js",
entry_point_name = "material",
globals = ROLLUP_GLOBALS,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if the globals are out of date now that rxjs has only two entry points

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They should be good; this just captures the globals specific to our own packages

data = [
":theming_bundle",
"//src/lib/prebuilt-themes:indigo-pink",
"//src/lib/prebuilt-themes:deeppurple-amber",
"//src/lib/prebuilt-themes:pink-bluegrey",
"//src/lib/prebuilt-themes:purple-green",
],
packages = ["//src/lib/schematics:npm_package"],
deps = MATERIAL_TARGETS,
)
43 changes: 43 additions & 0 deletions tools/bazel-stamp-vars.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env bash

# Generates the data used by the stamping feature in bazel.
# This script is intended to be used as a Bazel workspace_status_command, which
# prints out a set of key-value pairs.
# See https://github.com/angular/angular/blob/master/docs/BAZEL.md for more explanation
set -u -e -E -o pipefail

function onError {
echo "Failed to execute: $0"
echo ""
}

# Setup crash trap
trap 'onError' ERR

if [[ "$(git tag)" == "" ]]; then
echo "No git tags found, can't stamp the build."
echo "Either fetch the tags:"
echo " git fetch [email protected]:angular/material2.git --tags"
echo "or build without stamping by giving an empty workspace_status_command:"
echo " bazel build --workspace_status_command= ..."
echo ""
fi

# Gets a human-readable name for HEAD, e.g. "6.0.0-rc.0-15-g846ddfa"
git_version_raw=$(git describe --abbrev=7 --tags HEAD)

# Find out if there are any uncommitted local changes
if [[ $(git status --untracked-files=no --porcelain) ]]; then
local_changes_suffix=".with-local-changes";
else
local_changes_suffix="";
fi

# Reformat `git describe` version string into a more semver-ish string
# From: 5.2.0-rc.0-57-g757f886
# To: 5.2.0-rc.0+57.sha-757f886
# Or: 5.2.0-rc.0+57.sha-757f886.with-local-changes

semver_style_version="$(echo ${git_version_raw} | sed -E 's/-([0-9]+)-g/+\1.sha-/g')"
version_stamp="${semver_style_version}${local_changes_suffix}"
echo "BUILD_SCM_VERSION ${version_stamp}"
5 changes: 3 additions & 2 deletions tools/bazel.rc
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ test --test_output=errors
build --experimental_ui
test --experimental_ui

# Output to a more coventional location
build --symlink_prefix=dist/bazel/
# Configures script to do version stamping.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean to remove symlink_prefix?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I meant to remove it a while ago and lost the change

# See https://docs.bazel.build/versions/master/user-manual.html#flag--workspace_status_command
build --workspace_status_command=./tools/bazel-stamp-vars.sh

###############################
# Typescript / Angular / Sass #
Expand Down