diff --git a/.autorc b/.autorc index 926a020dd..067d94bcb 100644 --- a/.autorc +++ b/.autorc @@ -12,7 +12,7 @@ "versionFile": "./VERSION", "publishScript": "./scripts/release.sh", "publishScriptReleaseTypeArgs": { - "next": ["release"] + "next": ["next"] } } ], diff --git a/docs/site/components/App.tsx b/docs/site/components/App.tsx index 6e1a1e18b..9835e8ec8 100644 --- a/docs/site/components/App.tsx +++ b/docs/site/components/App.tsx @@ -1,12 +1,12 @@ import React from "react"; import { createRoot } from "react-dom/client"; -import { createBrowserRouter, RouterProvider } from "react-router-dom"; +import { RouterProvider, createHashRouter } from "react-router-dom"; import { ChakraProvider } from "@chakra-ui/react"; import { PATH_TO_NAV } from "../config/navigation"; import { Context } from "./Context"; -const router = createBrowserRouter([ +const router = createHashRouter([ { path: "/", Component: React.lazy(() => import("../pages")), diff --git a/docs/site/config/navigation.ts b/docs/site/config/navigation.ts index 691f7d694..97837d1e5 100644 --- a/docs/site/config/navigation.ts +++ b/docs/site/config/navigation.ts @@ -102,6 +102,10 @@ const navigation: Navigation = { title: 'Schema', path: '/dsl/schema', }, + { + title: 'Plugins', + path: '/dsl/plugins', + }, ], }, { diff --git a/docs/site/package.json b/docs/site/package.json index 704e3087f..474e32592 100644 --- a/docs/site/package.json +++ b/docs/site/package.json @@ -1,6 +1,7 @@ { "name": "@player-ui/docs", "private": true, + "homepage": "https://player-ui.github.io", "type": "module", "dependencies": { "@player-ui/react": "workspace:*", diff --git a/scripts/release.sh b/scripts/release.sh index fcae8b579..b7a64652a 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -3,23 +3,24 @@ set -u -o pipefail -readonly PKG_NPM_LABELS=`bazel query --output=label 'kind("npm_package rule", //...) - attr("tags", "\[.*do-not-publish.*\]", //...)'` -NPM_TAG=canary + # Called by auto -- `release` for normal releases or `snapshot` for canary/next. readonly RELEASE_TYPE=${1:-snapshot} readonly CURRENT_BRANCH=`git symbolic-ref --short HEAD` -if [ "$RELEASE_TYPE" == "snapshot" ] && [ "$CURRENT_BRANCH" == "main" ]; then +NPM_TAG=canary +if [ "$RELEASE_TYPE" == "next" ] && [ "$CURRENT_BRANCH" == "main" ]; then NPM_TAG=next elif [ "$RELEASE_TYPE" == "release" ] && [ "$CURRENT_BRANCH" == "main" ]; then # Releases off the main branch are for older majors. # Don't want to bump the latest tag for those - NPM_TAG=latest fi +# NPM Publishing echo "Publishing NPM Packages using tag: ${NPM_TAG} from release type: ${RELEASE_TYPE} on branch: ${CURRENT_BRANCH}" +readonly PKG_NPM_LABELS=`bazel query --output=label 'kind("npm_package rule", //...) - attr("tags", "\[.*do-not-publish.*\]", //...)'` for pkg in $PKG_NPM_LABELS ; do bazel run --config=release -- ${pkg}.publish --access public --tag ${NPM_TAG} @@ -27,24 +28,30 @@ done # Rebuild to stamp the release podspec bazel build --config=release //:PlayerUI_Podspec //:PlayerUI_Pod - bazel run --config=release //:ios_publish # Maven Central publishing -bazel run @rules_player//distribution:staged-maven-deploy -- "$RELEASE_TYPE" --package-group=com.intuit.playerui --legacy --client-timeout=600 --connect-timeout=600 +MVN_RELEASE_TYPE=snapshot +if [ "$RELEASE_TYPE" == "next" ] && [ "$CURRENT_BRANCH" == "main" ]; then + MVN_RELEASE_TYPE=release +elif [ "$RELEASE_TYPE" == "release" ] && [ "$CURRENT_BRANCH" == "main" ]; then + MVN_RELEASE_TYPE=release +fi + +echo "Publishing Maven Packages with release type: ${MVN_RELEASE_TYPE} on branch: ${CURRENT_BRANCH}" +bazel run @rules_player//distribution:staged-maven-deploy -- "$MVN_RELEASE_TYPE" --package-group=com.intuit.playerui --legacy --client-timeout=600 --connect-timeout=600 # Running this here because it will still have the pre-release version in the VERSION file before auto cleans it up # Make sure to re-stamp the outputs with the BASE_PATH so nextjs knows what to do with links -# Commented out as it needs to be re-written -if [ "$RELEASE_TYPE" == "snapshot" ] && [ "$CURRENT_BRANCH" == "main" ]; then +# Docs publishing +echo "Publishing Docs with release type: ${RELEASE_TYPE} on branch: ${CURRENT_BRANCH}" +if [ "$RELEASE_TYPE" == "next" ] && [ "$CURRENT_BRANCH" == "main" ]; then STABLE_DOCS_BASE_PATH=next bazel run --verbose_failures --config=release //docs:gh_deploy -- --dest_dir next elif [ "$RELEASE_TYPE" == "release" ] && [ "$CURRENT_BRANCH" == "main" ]; then STABLE_DOCS_BASE_PATH=latest bazel run --verbose_failures --config=release //docs:gh_deploy -- --dest_dir latest fi -# Commented out for now due to failures to deploy -# causes lots of "java.io.IOException: io.grpc.StatusRuntimeException: CANCELLED: Failed to read message." messages in the build # Also deploy to the versioned folder for main releases if [ "$RELEASE_TYPE" == "release" ]; then SEMVER_MAJOR=$(cat VERSION | cut -d. -f1)