xref: /aosp_15_r20/external/google-java-format/util/publish-snapshot-on-commit.sh (revision 10816b529e1d7005ca788e7b4c5efd1c72957e26)
1*10816b52SSorin Basca# Copyright 2020 Google Inc.
2*10816b52SSorin Basca#
3*10816b52SSorin Basca# Licensed under the Apache License, Version 2.0 (the "License");
4*10816b52SSorin Basca# you may not use this file except in compliance with the License.
5*10816b52SSorin Basca# You may obtain a copy of the License at
6*10816b52SSorin Basca#
7*10816b52SSorin Basca#      http://www.apache.org/licenses/LICENSE-2.0
8*10816b52SSorin Basca#
9*10816b52SSorin Basca# Unless required by applicable law or agreed to in writing, software
10*10816b52SSorin Basca# distributed under the License is distributed on an "AS IS" BASIS,
11*10816b52SSorin Basca# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*10816b52SSorin Basca# See the License for the specific language governing permissions and
13*10816b52SSorin Basca# limitations under the License.
14*10816b52SSorin Basca
15*10816b52SSorin Basca# https://github.com/google/dagger/blob/master/util/publish-snapshot-on-commit.sh
16*10816b52SSorin Basca
17*10816b52SSorin Bascaif [ "$TRAVIS_REPO_SLUG" == "google/google-java-format" ] && \
18*10816b52SSorin Basca   [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ] && \
19*10816b52SSorin Basca   [ "$TRAVIS_PULL_REQUEST" == "false" ] && \
20*10816b52SSorin Basca   [ "$TRAVIS_BRANCH" == "master" ]; then
21*10816b52SSorin Basca  echo -e "Publishing maven snapshot...\n"
22*10816b52SSorin Basca
23*10816b52SSorin Basca  mvn clean source:jar deploy --settings="util/settings.xml" -DskipTests=true -Dinvoker.skip=true -Dmaven.javadoc.skip=true
24*10816b52SSorin Basca
25*10816b52SSorin Basca  echo -e "Published maven snapshot"
26*10816b52SSorin Bascafi
27