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
1 change: 1 addition & 0 deletions .circleci/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ async function run() {
[NextJS Test App](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/next/index.html)
[RAC Spectrum + Tailwind Example](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/rac-spectrum-tailwind/index.html)
[S2 Parcel Example](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/s2-parcel-example/index.html)
[S2 Vite Example](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/s2-vite-project/index.html)
[S2 Custom Icons](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/icon-builder-fixture/index.html)
[S2 Webpack Example](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/s2-webpack-5-example/index.html)
[S2 Next.js Example](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/s2-next-macros/index.html)
Expand Down
26 changes: 26 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,28 @@ jobs:
paths:
- '*/verdaccio/s2-parcel-example'

v-s2-vite:
executor: rsp-xlarge
steps:
- restore_cache:
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}

- attach_workspace:
at: /tmp/verdaccio-workspace

- run:
name: build s2-vite off verdaccio
command: |
./scripts/verdaccio-ci.sh
./scripts/verdaccio-build-s2-vite.sh
environment:
VERDACCIO_STORAGE_PATH: /tmp/verdaccio-workspace/storage

- persist_to_workspace:
root: verdaccio_dist
paths:
- '*/verdaccio/s2-vite-project'

v-s2-webpack:
executor: rsp-xlarge
steps:
Expand Down Expand Up @@ -999,6 +1021,9 @@ workflows:
- v-s2-parcel:
requires:
- verdaccio
- v-s2-vite:
requires:
- verdaccio
- v-s2-webpack:
requires:
- verdaccio
Expand Down Expand Up @@ -1054,6 +1079,7 @@ workflows:
- v-nextjs
- v-rac-rsp-tailwind
- v-s2-parcel
- v-s2-vite
- v-s2-webpack
- v-s2-next
- v-icon-builder
Expand Down
42 changes: 42 additions & 0 deletions scripts/verdaccio-build-s2-vite.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env bash

port=4000
registry="http://localhost:$port"
output="output.out"
touch $output

set -e

echo "Building docs with verdaccio"

# Wait for verdaccio to start
grep -q 'http address' <(tail -f $output)

if curl -sI http://localhost:4000/ >/dev/null; then
echo "Verdaccio is running on port 4000."
else
echo "Verdaccio is NOT running on port 4000."
fi

yarn config set npmPublishRegistry --home $registry
yarn config set npmRegistryServer --home $registry
yarn config set npmAlwaysAuth --home false
yarn config set npmAuthToken --home abc
yarn config set unsafeHttpWhitelist --home localhost
npm set registry $registry

# Rename the dist folder from dist/production/docs to verdaccio_dist/COMMIT_HASH_BEFORE_PUBLISH/verdaccio/docs
# This is so we can have verdaccio build in a separate stream from deploy and deploy_prod
verdaccio_path=verdaccio_dist/`git rev-parse HEAD~0`/verdaccio
mkdir -p $verdaccio_path


echo 'build Spectrum 2 + Vite test app'
cd examples/s2-vite-project
yarn config set npmRegistryServer $registry
yarn install --no-immutable
yarn up @react-spectrum/s2
yarn build --base="./"
mv dist ../../$verdaccio_path/s2-vite-project

netstat -tpln | awk -F'[[:space:]/:]+' '$5 == 4000 {print $(NF-2)}' | xargs kill
Loading