Fixed Java deploy script

Change-Id: If088f709961baa6b78c2b0e7dda65d7f4f0c0539
This commit is contained in:
thomasclark
2014-06-30 10:26:27 -04:00
parent 256b052a55
commit 15212967ec
2 changed files with 10 additions and 22 deletions

View File

@@ -3,8 +3,8 @@ username=admin
password=
deploy.dir=/home/admin
deploy.kill.command=/usr/local/frc/bin/frcKillRobot.sh -t -r
deploy.run.command=/usr/local/frc/bin/frcRunRobot.sh
deploy.debug.command = /usr/local/frc/JRE/bin/java -XX:+UsePerfData -agentlib:jdwp=transport=dt_socket,address=8348,server=y,suspend=y -jar ${deploy.dir}/FRCUserProgram.jar
deploy.log.file=/var/local/natinst/log/FRC_UserProgram.log
command.dir=/home/lvuser/
# Libraries to use
@@ -37,4 +37,3 @@ simulation.dist.jar=${dist.dir}/FRCUserProgramSim.jar
wpilib.sim=${wpilib}/sim
wpilib.sim.lib=${wpilib.sim}/lib
wpilib.sim.tools=${wpilib.sim}/tools

View File

@@ -68,36 +68,26 @@
</jar>
</target>
<target name="kill" depends="get-target-ip" description="Kill any previously running program.">
<echo>[athena-deploy] Killing current program.</echo>
<sshexec host="${target}"
username="${username}"
password="${password}"
trust="true"
command=". /etc/profile.d/natinst-path.sh; chmod a+x run*program; ${deploy.kill.command}"/>
</target>
<target name="deploy" depends="get-target-ip,jar,kill" description="Deploy the jar and start the program running.">
<target name="deploy" depends="get-target-ip,jar" description="Deploy the jar and start the program running.">
<echo>[athena-deploy] Copying code over.</echo>
<scp file="${dist.jar}" todir="${username}@${target}:${deploy.dir}" password="${password}" trust="true"/>
<scp file="${wpilib.ant.dir}/robotCommand" todir="${username}@${target}:${command.dir}" password="${password}" trust="true"/>
<sshexec host="${target}"
username="${username}"
password="${password}"
trust="true"
failonerror="false"
command=". /etc/profile.d/natinst-path.sh; rm ${deploy.debug.file}"/>
<echo>[athena-deploy] Starting program.</echo>
<sshexec host="${target}"
username="${username}"
password="${password}"
trust="true"
command=". /etc/profile.d/natinst-path.sh; ${deploy.run.command}"/>
command=". /etc/profile.d/natinst-path.sh; chmod a+x run*program; ${deploy.kill.command};"/>
<sshexec host="${target}"
username="${username}"
password="${password}"
trust="true"
command="tail -f -s 0 -n 1 ${deploy.log.file}"/>
</target>
<target name="debug-deploy" depends="get-target-ip,jar,kill" description="Deploy the jar and start the program running.">
<target name="debug-deploy" depends="get-target-ip,jar" description="Deploy the jar and start the program running.">
<echo>[athena-deploy] Copying code over.</echo>
<scp file="${dist.jar}" todir="${username}@${target}:${deploy.dir}" password="${password}" trust="true"/>
@@ -178,4 +168,3 @@
</parallel>
</target>
</project>