|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + Licensed to the Apache Software Foundation (ASF) under one or more |
| 4 | + contributor license agreements. See the NOTICE file distributed with |
| 5 | + this work for additional information regarding copyright ownership. |
| 6 | + The ASF licenses this file to You under the Apache License, Version 2.0 |
| 7 | + (the "License"); you may not use this file except in compliance with |
| 8 | + the License. You may obtain a copy of the License at |
| 9 | +
|
| 10 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +
|
| 12 | + Unless required by applicable law or agreed to in writing, software |
| 13 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | + See the License for the specific language governing permissions and |
| 16 | + limitations under the License. |
| 17 | +--> |
| 18 | +<project name="Apache Atlas Release Tasks" default="build-release"> |
| 19 | + <description> |
| 20 | + Apache Atlas Build Release Tasks |
| 21 | + </description> |
| 22 | + |
| 23 | + <property name="release-dir" value="target" /> |
| 24 | + <property name="incubationstr" value="-incubating" /> |
| 25 | + <property name="release-name" value="apache-atlas-${atlas-release-version}${incubationstr}" /> |
| 26 | + |
| 27 | + <property name="build-release-tar-file" value="${release-name}-sources.tar.gz" /> |
| 28 | + |
| 29 | + <target name="version-check"> |
| 30 | + <fail message="Missing atlas-release-version; -Datlas-release-version=<version-number> should be defined" |
| 31 | + unless="atlas-release-version" /> |
| 32 | + </target> |
| 33 | + |
| 34 | + <target name="build-release" depends="version-check"> |
| 35 | + <tstamp/> |
| 36 | + <exec executable="mvn"> |
| 37 | + <arg value="clean" /> |
| 38 | + </exec> |
| 39 | + <mkdir dir="${release-dir}" /> |
| 40 | + <tar destfile="${release-dir}/${build-release-tar-file}" compression="gzip" longfile="posix"> |
| 41 | + <tarfileset prefix="${release-name}" dir="."> |
| 42 | + <exclude name="git" /> |
| 43 | + <exclude name="*/.gitignore" /> |
| 44 | + <exclude name=".settings/**" /> |
| 45 | + <exclude name="*/.settings/**" /> |
| 46 | + <exclude name=".classpath" /> |
| 47 | + <exclude name="*/.classpath" /> |
| 48 | + <exclude name=".project" /> |
| 49 | + <exclude name="*/.project" /> |
| 50 | + <exclude name="winpkg/*" /> |
| 51 | + <exclude name="hdfs-agent/dependency-reduced-pom.xml" /> |
| 52 | + <exclude name="*/bin/**" /> |
| 53 | + <exclude name="*/target/**" /> |
| 54 | + <exclude name="**/.DS_Store" /> |
| 55 | + <exclude name="target/**" /> |
| 56 | + </tarfileset> |
| 57 | + </tar> |
| 58 | + |
| 59 | + <exec executable="gpg"> |
| 60 | + <arg value="--armor" /> |
| 61 | + <arg value="--output" /> |
| 62 | + <arg value="${release-dir}/${build-release-tar-file}.asc" /> |
| 63 | + <arg value="--detach-sig" /> |
| 64 | + <arg value="${release-dir}/${build-release-tar-file}" /> |
| 65 | + </exec> |
| 66 | + |
| 67 | + <exec executable="gpg" output="${release-dir}/${build-release-tar-file}.mds"> |
| 68 | + <arg value="--print-mds" /> |
| 69 | + <arg value="${release-dir}/${build-release-tar-file}" /> |
| 70 | + </exec> |
| 71 | + </target> |
| 72 | +</project> |
0 commit comments