mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-18 19:46:57 +02:00
misc: simplify test release script (#2641)
* misc: simplify test release script * misc: suppress output of Docker command
This commit is contained in:
parent
1863a3c805
commit
bfeb1044fb
1 changed files with 2 additions and 10 deletions
|
@ -3,8 +3,6 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
CUSTOM_REGISTRY_URL="http://localhost:4873"
|
CUSTOM_REGISTRY_URL="http://localhost:4873"
|
||||||
npm_config_registry="$CUSTOM_REGISTRY_URL"
|
|
||||||
ORIGINAL_YARN_REGISTRY_URL=`yarn config get registry`
|
|
||||||
NEW_VERSION="$(node -p "require('./packages/docusaurus/package.json').version").NEW"
|
NEW_VERSION="$(node -p "require('./packages/docusaurus/package.json').version").NEW"
|
||||||
CONTAINER_NAME="verdaccio"
|
CONTAINER_NAME="verdaccio"
|
||||||
|
|
||||||
|
@ -14,9 +12,6 @@ docker run -d --rm --name "$CONTAINER_NAME" -p 4873:4873 -v "$PWD/admin/verdacci
|
||||||
# Build packages
|
# Build packages
|
||||||
yarn tsc
|
yarn tsc
|
||||||
|
|
||||||
# Set Yarn registry to own local registry
|
|
||||||
yarn config set registry "$CUSTOM_REGISTRY_URL"
|
|
||||||
|
|
||||||
# Publish the monorepo
|
# Publish the monorepo
|
||||||
npx --no-install lerna publish --yes --no-verify-access --no-git-reset --no-git-tag-version --no-push --registry "$CUSTOM_REGISTRY_URL" "$NEW_VERSION"
|
npx --no-install lerna publish --yes --no-verify-access --no-git-reset --no-git-tag-version --no-push --registry "$CUSTOM_REGISTRY_URL" "$NEW_VERSION"
|
||||||
|
|
||||||
|
@ -24,15 +19,12 @@ npx --no-install lerna publish --yes --no-verify-access --no-git-reset --no-git-
|
||||||
git diff --name-only -- '*.json' | sed 's, ,\\&,g' | xargs git checkout --
|
git diff --name-only -- '*.json' | sed 's, ,\\&,g' | xargs git checkout --
|
||||||
|
|
||||||
# Build skeleton website with new version
|
# Build skeleton website with new version
|
||||||
npx @docusaurus/init@latest init test-website classic
|
npm_config_registry="$CUSTOM_REGISTRY_URL" npx @docusaurus/init@"$NEW_VERSION" init test-website classic
|
||||||
|
|
||||||
# Restore the original Yarn registry URL
|
|
||||||
yarn config set registry "$ORIGINAL_YARN_REGISTRY_URL"
|
|
||||||
|
|
||||||
# Stop Docker container
|
# Stop Docker container
|
||||||
if ( $(docker container inspect "$CONTAINER_NAME" > /dev/null 2>&1) ); then
|
if ( $(docker container inspect "$CONTAINER_NAME" > /dev/null 2>&1) ); then
|
||||||
# Remove Docker container
|
# Remove Docker container
|
||||||
docker container stop $CONTAINER_NAME
|
docker container stop $CONTAINER_NAME > /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "The website with to-be published packages was successfully build to the $(tput setaf 2)test-website$(tput sgr 0) directory."
|
echo "The website with to-be published packages was successfully build to the $(tput setaf 2)test-website$(tput sgr 0) directory."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue