Skip to content

Instantly share code, notes, and snippets.

@stickfigure
Created August 10, 2013 17:04
Show Gist options
  • Save stickfigure/6201192 to your computer and use it in GitHub Desktop.
Save stickfigure/6201192 to your computer and use it in GitHub Desktop.
Ant snippet for GAE rolling deployment
<target name="deploy-prod" depends="auth, optimize">
<property name="appid" value="theappid" />
<tstamp>
<format property="vnum" pattern="yyyy-MM-dd-HHmm"/>
</tstamp>
<echo message="Deploying to version: ${vnum}" />
<appcfg action="update" war="${staging.dir}">
<options>
<arg value="--oauth2" />
<arg value="--application=${appid}" />
<arg value="--version=${vnum}" />
</options>
</appcfg>
<get src="http://${vnum}.${appid}.appspot.com/ping" dest="${build.dir}/warmup-garbage" verbose="true" />
</target>
<target name="deploy-prod-switch" depends="deploy-prod">
<appcfg action="set_default_version" war="${staging.dir}">
<options>
<arg value="--oauth2" />
<arg value="--application=${appid}" />
<arg value="--version=${vnum}" />
</options>
</appcfg>
</target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment