Skip to content

Commit

Permalink
b2b
Browse files Browse the repository at this point in the history
  • Loading branch information
zramsay committed Sep 27, 2023
1 parent 207f1d7 commit 3129901
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#!/bin/bash
# Usage: build-npm-package.sh <registry-url> <publish-with-this-version>
# Note: supply the registry auth token in CERC_NPM_AUTH_TOKEN
#
if [ "$GITEA_ACTIONS" = "true" ]; then
echo "WORKS"
else
echo "WTF"
fi

if [[ -n "$CERC_SCRIPT_DEBUG" ]]; then
set -x
fi
Expand Down Expand Up @@ -29,7 +36,7 @@ local_npm_registry_url_fixed=$( echo ${local_npm_registry_url} | sed -e 's/^http
npm config set -- ${local_npm_registry_url_fixed}:_authToken ${CERC_NPM_AUTH_TOKEN}
# First check if the version of this package we're trying to build already exists in the registry
# but this line: "jq -r .data.dist.tarball" fails only in gitea, so skip this block
if [[ $GITEA_ACTIONS != "true" ]]; then
if [[ ${GITEA_ACTIONS} != "true" ]]; then
package_exists=$( yarn info --json ${package_name}@${package_publish_version} 2>/dev/null | jq -r .data.dist.tarball )
if [[ ! -z "$package_exists" && "$package_exists" != "null" ]]; then
echo "${package_publish_version} of ${package_name} already exists in the registry"
Expand Down

0 comments on commit 3129901

Please sign in to comment.