From 5c91370505f93dc5f717e89031a3a5f2a4166eee Mon Sep 17 00:00:00 2001 From: Tim Schmelter Date: Wed, 1 May 2024 12:25:07 -0700 Subject: [PATCH] chore: add local publish helper for release verification against amplify-backend (#2517) --- codebuild_specs/scripts/local_publish_helpers.sh | 1 + shared-scripts.sh | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/codebuild_specs/scripts/local_publish_helpers.sh b/codebuild_specs/scripts/local_publish_helpers.sh index 4193e2b952..7f5ce2c12a 100755 --- a/codebuild_specs/scripts/local_publish_helpers.sh +++ b/codebuild_specs/scripts/local_publish_helpers.sh @@ -56,6 +56,7 @@ function changeSudoNpmGlobalPath { function setNpmRegistryUrlToLocal { # Set registry to local registry + echo "Setting custom NPM registry: $custom_registry_url." npm set registry "$custom_registry_url" yarn config set registry "$custom_registry_url" } diff --git a/shared-scripts.sh b/shared-scripts.sh index 073b536ca9..d59901880d 100755 --- a/shared-scripts.sh +++ b/shared-scripts.sh @@ -164,6 +164,14 @@ function _publishToLocalRegistry { _generateChangeLog } +function _publishLocalWorkspace { + source codebuild_specs/scripts/local_publish_helpers.sh + startLocalRegistry "$(pwd)/codebuild_specs/scripts/verdaccio.yaml" + setNpmRegistryUrlToLocal + setNpmTag + yarn publish-to-verdaccio + unsetNpmRegistryUrl +} function _generateChangeLog { echo "Generate Change Log" git reset --hard HEAD