blob: 850d2b9a7684623ac8ca0e6aa82c023018e78276 [file] [log] [blame]
<?xml version="1.0" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="royale-docs" default="main" basedir=".">
<property file="${basedir}/../env.properties"/>
<property environment="env"/>
<property file="${basedir}/../local.properties"/>
<property file="${basedir}/../build.properties"/>
<condition property="jekyll.executable" value="jekyll" else="jekyll.bat" >
<not>
<os family="windows"/>
</not>
</condition>
<property name="launchURL" value="http://127.0.0.1:4000/royale-docs/"/>
<target name="main" description="Build everything">
<exec executable="${jekyll.executable}" failonerror="true">
<arg value="build" />
<arg value="--config" />
<arg value="local_config.yml" />
</exec>
</target>
<target name="serve" description="Serve and launch">
<!-- this approach/sequence works on windows, needs checking on mac -->
<script language="javascript"><![CDATA[
var location = project.getProperty("launchURL").toString();
java.awt.Desktop.getDesktop().browse(java.net.URI.create(location));
]]></script>
<exec executable="${jekyll.executable}" failonerror="true">
<arg value="serve" />
</exec>
</target>
</project>