1*af546375SCole Faust#!/bin/bash 2*af546375SCole Faust# Copyright 2018 Google LLC 3*af546375SCole Faust# 4*af546375SCole Faust# Licensed under the Apache License, Version 2.0 (the "License"); 5*af546375SCole Faust# you may not use this file except in compliance with the License. 6*af546375SCole Faust# You may obtain a copy of the License at 7*af546375SCole Faust# 8*af546375SCole Faust# http://www.apache.org/licenses/LICENSE-2.0 9*af546375SCole Faust# 10*af546375SCole Faust# Unless required by applicable law or agreed to in writing, software 11*af546375SCole Faust# distributed under the License is distributed on an "AS IS" BASIS, 12*af546375SCole Faust# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*af546375SCole Faust# See the License for the specific language governing permissions and 14*af546375SCole Faust# limitations under the License. 15*af546375SCole Faust 16*af546375SCole Faustset -eo pipefail 17*af546375SCole Faust 18*af546375SCole Faust# STAGING_REPOSITORY_ID must be set 19*af546375SCole Faustif [ -z "${STAGING_REPOSITORY_ID}" ]; then 20*af546375SCole Faust echo "Missing STAGING_REPOSITORY_ID environment variable" 21*af546375SCole Faust exit 1 22*af546375SCole Faustfi 23*af546375SCole Faust 24*af546375SCole Faustsource $(dirname "$0")/common.sh 25*af546375SCole Faustpushd $(dirname "$0")/../../ 26*af546375SCole Faust 27*af546375SCole Faustsetup_environment_secrets 28*af546375SCole Faustcreate_settings_xml_file "settings.xml" 29*af546375SCole Faust 30*af546375SCole Faustmvn nexus-staging:drop -B \ 31*af546375SCole Faust --settings=settings.xml \ 32*af546375SCole Faust -DstagingRepositoryId=${STAGING_REPOSITORY_ID} 33