【问题标题】:Play Framework 2.4.x custom deploy scriptPlay Framework 2.4.x 自定义部署脚本
【发布时间】:2015-06-15 08:37:41
【问题描述】:

我想使用自定义运行脚本构建我的应用程序。 在“激活器阶段”之后,我构建了应用程序,带有默认运行脚本。

所以我需要用我自己的替换默认脚本。

我需要这样的批处理文件:

@echo off
set "name=projectName"

activator clean stage || pause 1

del ".\target\universal\stage\bin\%name%.bat"

exit

但是调用 'activator clean stage' 脚本自动关闭后,我该如何解决这个问题?

【问题讨论】:

  • 它不是在删除 projectName.bat,还是您希望它暂停?因为除非激活器失败,否则该代码不会暂停。
  • 这个脚本没有到达这一行:'del ".\target\universal\stage\bin\%name%.bat"'。我只想在'stage'完成时删除文件,但脚本在'stage'完成后自动关闭。

标签: batch-file typesafe-activator playframework-2.4


【解决方案1】:

如果你使用的是 Windows,那么 bat:

@echo off
activator clean stage
copy custom.bat c:\target\universal\stage\bin\myproject.bat

custom.bat 是用于启动项目的 bat。 但最好看看你的项目的自定义配置 https://www.playframework.com/documentation/2.1.x/ProductionConfiguration

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-11-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-05
    相关资源
    最近更新 更多