Files
openapi-generator/samples/client/petstore/apex/build.xml
T
wing328 7edf744426 [Apex] add petstore samples, shell scripts, batch files (#5672)
* add apex petstore samples, shell scripts, batch files

* add wording "beta" to Apex help
2017-05-20 01:02:08 +08:00

97 lines
3.6 KiB
XML

<project name="Swagger Petstore" default="deploy" basedir="." xmlns:sf="antlib:com.salesforce">
<property environment="env"/>
<property file="build.properties"/>
<condition property="SF_USERNAME" value="">
<not>
<isset property="SF_USERNAME"></isset>
</not>
</condition>
<condition property="SF_PASSWORD" value="">
<not>
<isset property="SF_PASSWORD"></isset>
</not>
</condition>
<condition property="SF_SESSIONID" value="">
<not>
<isset property="SF_SESSIONID"></isset>
</not>
</condition>
<condition property="sf.serverurl" value="login.salesforce.com">
<not>
<isset property="sf.serverurl"></isset>
</not>
</condition>
<condition property="sf.maxPoll" value="200">
<not>
<isset property="sf.maxPoll"></isset>
</not>
</condition>
<condition property="sf.username" value="${env.SF_USERNAME}" else="${SF_USERNAME}">
<isset property="env.SF_USERNAME"/>
</condition>
<condition property="sf.password" value="${env.SF_PASSWORD}" else="${SF_PASSWORD}">
<isset property="env.SF_PASSWORD"/>
</condition>
<condition property="sf.sessionId" value="${env.SF_SESSIONID}" else="${SF_SESSIONID}">
<isset property="env.SF_SESSIONID"/>
</condition>
<taskdef resource="com/salesforce/antlib.xml" uri="antlib:com.salesforce">
<classpath>
<pathelement location="./ant-salesforce.jar"/>
</classpath>
</taskdef>
<target name="deploy"
description="Deploys the API client library to your Salesforce organization">
<echo message="Deploying the API client library..."/>
<sf:deploy username="${sf.username}" password="${sf.password}"
sessionId="${sf.sessionId}" serverurl="${sf.serverurl}"
maxPoll="${sf.maxPoll}" deployRoot="deploy" testLevel="RunSpecifiedTests"
rollbackOnError="true">
<runTest>SwagPetApiTest</runTest>
<runTest>SwagStoreApiTest</runTest>
<runTest>SwagUserApiTest</runTest>
<runTest>SwagApiResponseTest</runTest>
<runTest>SwagCategoryTest</runTest>
<runTest>SwagOrderTest</runTest>
<runTest>SwagPetTest</runTest>
<runTest>SwagTagTest</runTest>
<runTest>SwagUserTest</runTest>
<runTest>SwaggerTest</runTest>
</sf:deploy>
</target>
<target name="undeploy"
description="Removes the API client library from your Salesforce organization">
<echo message="Removing the API client library..."/>
<sf:deploy username="${sf.username}" password="${sf.password}"
sessionId="${sf.sessionId}" serverurl="${sf.serverurl}"
maxPoll="${sf.maxPoll}" deployRoot="undeploy"/>
</target>
<target name="deployCheckOnly"
description="Deploys the API client library in check-only mode, without saving changes">
<echo message="Run 'ant deploy' to deploy this library to your organization."/>
<echo message="Testing deployment of this API client library without saving changes"/>
<sf:deploy username="${sf.username}" password="${sf.password}"
sessionId="${sf.sessionId}" serverurl="${sf.serverurl}"
maxPoll="${sf.maxPoll}" deployRoot="deploy" testLevel="RunSpecifiedTests"
checkOnly="true">
<runTest>SwagPetApiTest</runTest>
<runTest>SwagStoreApiTest</runTest>
<runTest>SwagUserApiTest</runTest>
<runTest>SwagApiResponseTest</runTest>
<runTest>SwagCategoryTest</runTest>
<runTest>SwagOrderTest</runTest>
<runTest>SwagPetTest</runTest>
<runTest>SwagTagTest</runTest>
<runTest>SwagUserTest</runTest>
<runTest>SwaggerTest</runTest>
</sf:deploy>
</target>
</project>