-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathbuild-publish.xml
45 lines (38 loc) · 1.8 KB
/
build-publish.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?xml version="1.0" encoding="UTF-8" ?>
<!--
This file is part of SoSy-Lab Java-Project Template,
a collection of common files and build definitions for Java projects:
https://gitlab.com/sosy-lab/software/java-project-template
SPDX-FileCopyrightText: 2018-2020 Dirk Beyer <https://www.sosy-lab.org>
SPDX-License-Identifier: Apache-2.0
-->
<!-- vim: set tabstop=8 shiftwidth=4 expandtab filetype=ant : -->
<project name="publish" basedir="."
xmlns:ivy="antlib:org.apache.ivy.ant">
<!-- Targets for publishing the project to an Ivy repository. -->
<!-- DO NOT EDIT LOCALLY!
Keep this file synchronized with
https://gitlab.com/sosy-lab/software/java-project-template
-->
<target name="publish-artifacts">
<available property="ivy.hasrepository" file="repository/${ivy.organisation}/${ivy.module}" />
<fail unless="ivy.hasrepository"
message="Cannot publish without 'repository' dir, please run 'svn co https://svn.sosy-lab.org/software/ivy/repository/${ivy.organisation}/${ivy.module} repository/${ivy.organisation}/${ivy.module}'." />
<fail unless="version.publishable"
message="Cannot publish version ${version}, only unmodified working copies may be published." />
<ivy:publish
conf="core, contrib, *(public)"
pubrevision="${version}"
resolver="Sosy-Lab-Publish"
status="release"
artifactspattern="[artifact]-[revision](-[classifier]).[ext]"
/>
<echo>
You now want to run
cd repository/${ivy.organisation}/${ivy.module}
svn add *-${version}*
svn ci -m"publish version ${version} of ${ant.project.name}"
cd -
to make the new version publicly available.</echo>
</target>
</project>