chore: import upstream snapshot with attribution
Automation / Format (push) Waiting to run
Automation / File Labeler (push) Waiting to run
Automation / Gemini Reviewed (push) Waiting to run
Coverage / Coverage (push) Waiting to run
Publish OpenClaw Skills / publish (push) Has been cancelled
Audit / Security Audit (push) Has been cancelled
Automation / Gemini Review (push) Has been cancelled
CI / Detect Changes (push) Has been cancelled
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Nix (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Cargo Deny (push) Has been cancelled
CI / Verify Skills (push) Has been cancelled
CI / Lint Skills (push) Has been cancelled
CI / Build (Linux x86_64) (push) Has been cancelled
CI / Build (macos-latest, aarch64-apple-darwin) (push) Has been cancelled
CI / Build (macos-latest, x86_64-apple-darwin) (push) Has been cancelled
CI / Build (ubuntu-latest, aarch64-unknown-linux-gnu) (push) Has been cancelled
CI / Build (windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelled
CI / API Smoketest (push) Has been cancelled
Policy / Policy Check (push) Has been cancelled
Release (Changeset) / Release (push) Has been cancelled
Automation / Format (push) Waiting to run
Automation / File Labeler (push) Waiting to run
Automation / Gemini Reviewed (push) Waiting to run
Coverage / Coverage (push) Waiting to run
Publish OpenClaw Skills / publish (push) Has been cancelled
Audit / Security Audit (push) Has been cancelled
Automation / Gemini Review (push) Has been cancelled
CI / Detect Changes (push) Has been cancelled
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Nix (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Cargo Deny (push) Has been cancelled
CI / Verify Skills (push) Has been cancelled
CI / Lint Skills (push) Has been cancelled
CI / Build (Linux x86_64) (push) Has been cancelled
CI / Build (macos-latest, aarch64-apple-darwin) (push) Has been cancelled
CI / Build (macos-latest, x86_64-apple-darwin) (push) Has been cancelled
CI / Build (ubuntu-latest, aarch64-unknown-linux-gnu) (push) Has been cancelled
CI / Build (windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelled
CI / API Smoketest (push) Has been cancelled
Policy / Policy Check (push) Has been cancelled
Release (Changeset) / Release (push) Has been cancelled
This commit is contained in:
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
# Copyright 2026 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Check if cargo-llvm-cov is installed
|
||||
if ! cargo llvm-cov --version &> /dev/null; then
|
||||
echo "cargo-llvm-cov is not installed. Installing..."
|
||||
cargo install cargo-llvm-cov
|
||||
fi
|
||||
|
||||
# Run coverage and generate HTML report
|
||||
echo "Running tests with coverage..."
|
||||
cargo llvm-cov --all-features --workspace --html
|
||||
cargo llvm-cov --all-features --workspace # Print text summary
|
||||
|
||||
echo "Coverage report generated at target/llvm-cov/html/index.html"
|
||||
|
||||
# Open the report if on macOS
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
open target/llvm-cov/html/index.html
|
||||
fi
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# Copyright 2026 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
clear
|
||||
cat "$1"
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
# Creates and pushes a git tag based on the version in package.json.
|
||||
# Idempotent — skips if the tag already exists.
|
||||
# Used by changesets/action as the publish command.
|
||||
set -euo pipefail
|
||||
|
||||
VERSION=$(node -p "require('./package.json').version")
|
||||
TAG="v${VERSION}"
|
||||
|
||||
if git rev-parse "$TAG" >/dev/null 2>&1 || git ls-remote --exit-code --tags origin "$TAG" >/dev/null 2>&1; then
|
||||
echo "Tag $TAG already exists, skipping"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Creating tag $TAG"
|
||||
git tag "$TAG"
|
||||
git push origin "$TAG"
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
# Syncs the version from package.json into all workspace Cargo.toml files,
|
||||
# updates Cargo.lock, and regenerates skills.
|
||||
# Used by changesets/action as a custom version command.
|
||||
set -euo pipefail
|
||||
|
||||
# Run the standard changeset version command first
|
||||
pnpm changeset version
|
||||
|
||||
# Read the new version from package.json
|
||||
VERSION=$(node -p "require('./package.json').version")
|
||||
|
||||
# Update version in all workspace crate Cargo.toml files
|
||||
# Uses awk to only change the version under [package], not other sections
|
||||
for cargo_toml in crates/*/Cargo.toml; do
|
||||
tmp=$(mktemp)
|
||||
awk -v ver="$VERSION" '
|
||||
/^\[package\]/ { in_pkg=1 }
|
||||
/^\[/ && !/^\[package\]/ { in_pkg=0 }
|
||||
in_pkg && /^version = / { $0 = "version = \"" ver "\"" }
|
||||
{ print }
|
||||
' "$cargo_toml" > "$tmp" && mv "$tmp" "$cargo_toml"
|
||||
done
|
||||
|
||||
# Update inter-crate dependency versions (e.g. google-workspace = { version = "X.Y.Z", path = "..." })
|
||||
sed -i.bak -E "s/(google-workspace = \{ version = \")[^\"]+/\1${VERSION}/" crates/google-workspace-cli/Cargo.toml
|
||||
rm -f crates/google-workspace-cli/Cargo.toml.bak
|
||||
|
||||
# Update npm installer package.json version
|
||||
node -e "
|
||||
const pkg = require('./npm/package.json');
|
||||
pkg.version = '${VERSION}';
|
||||
require('fs').writeFileSync('./npm/package.json', JSON.stringify(pkg, null, 2) + '\n');
|
||||
"
|
||||
|
||||
# Update Cargo.lock to match
|
||||
cargo generate-lockfile
|
||||
|
||||
# Update flake.lock if nix is available
|
||||
if command -v nix > /dev/null 2>&1; then
|
||||
nix flake lock --update-input nixpkgs
|
||||
fi
|
||||
|
||||
# Regenerate skills so metadata.version tracks the CLI version
|
||||
cargo run -- generate-skills --output-dir skills
|
||||
|
||||
# Stage the changed files so changesets/action commits them
|
||||
git add crates/*/Cargo.toml Cargo.lock flake.nix flake.lock skills/ npm/package.json
|
||||
|
||||
Reference in New Issue
Block a user