mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-14 10:37:00 +02:00
* Adding explicit MPL license for sub-package. This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Adding explicit MPL license for sub-package. This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Updating the license from MPL to Business Source License. Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at https://hashi.co/bsl-blog, FAQ at www.hashicorp.com/licensing-faq, and details of the license at www.hashicorp.com/bsl. * add missing license headers * Update copyright file headers to BUS-1.1 * Fix test that expected exact offset on hcl file --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Co-authored-by: Sarah Thompson <sthompson@hashicorp.com> Co-authored-by: Brian Kassouf <bkassouf@hashicorp.com>
56 lines
1.8 KiB
Bash
Executable File
56 lines
1.8 KiB
Bash
Executable File
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: BUSL-1.1
|
|
|
|
######################################################
|
|
# NOTE: This file is managed by the Digital Team's #
|
|
# Terraform configuration @ hashicorp/mktg-terraform #
|
|
######################################################
|
|
|
|
# Repo which we are cloning and executing npm run build:deploy-preview within
|
|
REPO_TO_CLONE=dev-portal
|
|
# Set the subdirectory name for the base project
|
|
PREVIEW_DIR=website-preview
|
|
# The directory we want to clone the project into
|
|
CLONE_DIR=website-preview
|
|
# The product for which we are building the deploy preview
|
|
PRODUCT=vault
|
|
# Preview mode, controls the UI rendered (either the product site or developer). Can be `io` or `developer`
|
|
PREVIEW_MODE=developer
|
|
|
|
# Get the git branch of the commit that triggered the deploy preview
|
|
# This will power remote image assets in local and deploy previews
|
|
CURRENT_GIT_BRANCH=$VERCEL_GIT_COMMIT_REF
|
|
|
|
# This is where content files live, relative to the website-preview dir. If omitted, "../content" will be used
|
|
LOCAL_CONTENT_DIR=
|
|
|
|
from_cache=false
|
|
|
|
if [ -d "$PREVIEW_DIR" ]; then
|
|
echo "$PREVIEW_DIR found"
|
|
CLONE_DIR="$PREVIEW_DIR-tmp"
|
|
from_cache=true
|
|
fi
|
|
|
|
# Clone the base project, if needed
|
|
echo "⏳ Cloning the $REPO_TO_CLONE repo, this might take a while..."
|
|
git clone --depth=1 "https://github.com/hashicorp/$REPO_TO_CLONE.git" "$CLONE_DIR"
|
|
|
|
if [ "$from_cache" = true ]; then
|
|
echo "Setting up $PREVIEW_DIR"
|
|
cp -R "./$CLONE_DIR/." "./$PREVIEW_DIR"
|
|
fi
|
|
|
|
# cd into the preview directory project
|
|
cd "$PREVIEW_DIR"
|
|
|
|
# Run the build:deploy-preview start script
|
|
PREVIEW_FROM_REPO=$PRODUCT \
|
|
IS_CONTENT_PREVIEW=true \
|
|
PREVIEW_MODE=$PREVIEW_MODE \
|
|
REPO=$PRODUCT \
|
|
HASHI_ENV=project-preview \
|
|
LOCAL_CONTENT_DIR=$LOCAL_CONTENT_DIR \
|
|
CURRENT_GIT_BRANCH=$CURRENT_GIT_BRANCH \
|
|
npm run build:deploy-preview
|