xref: /aosp_15_r20/external/google-auth-library-java/.kokoro/release/snapshot.sh (revision af546375c95127f07cb26dd492629ccb2e8b1be1)
1*af546375SCole Faust#!/bin/bash
2*af546375SCole Faust# Copyright 2019 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 Faustsource $(dirname "$0")/common.sh
19*af546375SCole FaustMAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml
20*af546375SCole Faustpushd $(dirname "$0")/../../
21*af546375SCole Faust
22*af546375SCole Faust# ensure we're trying to push a snapshot (no-result returns non-zero exit code)
23*af546375SCole Faustgrep SNAPSHOT versions.txt
24*af546375SCole Faust
25*af546375SCole Faustsetup_environment_secrets
26*af546375SCole Faustcreate_settings_xml_file "settings.xml"
27*af546375SCole Faust
28*af546375SCole Faustmvn clean deploy -B \
29*af546375SCole Faust  --settings ${MAVEN_SETTINGS_FILE} \
30*af546375SCole Faust  -DperformRelease=true \
31*af546375SCole Faust  -Dgpg.executable=gpg \
32*af546375SCole Faust  -Dgpg.passphrase=${GPG_PASSPHRASE} \
33*af546375SCole Faust  -Dgpg.homedir=${GPG_HOMEDIR}
34