使用Gradle打RPM包
Gradle可以使用非常丰富的插件,使用Gradle打RPM包,也是有插件可以使用的
插件名称:nebula.ospackage
链接:https://plugins.gradle.org/plugin/nebula.ospackage
我的Gradle是4.10版本,nebula.ospackage是5.1.0版本
首先引入插件
plugins { id "nebula.ospackage" version "5.1.0" }
然后就可以配置相应的任务了
ospackage { summary 'this is a rpm' arch 'X86_64' os 'LINUX' type 'BINARY' user 'nobody' permissionGroup 'nobody' from(distTar.getArchivePath()) { into "/opt/somedir" } } buildRpm { directory("/opt/somedir", 0755) link("/usr/bin/some-comman", "/opt/somedir/project/bin/some-comman") postInstall("tar -xf /opt/somedir/sometar.tar -C /opt/somedir; rm -rf /opt/somedir/someproject/bin/somecommand.bat;") } buildRpm.dependsOn(distTar)
相关推荐
CaesarHome 2020-11-09
chenkai00 2020-07-26
CaptainCTR 2020-07-09
afa0 2020-06-23
StephenWong 2020-06-18
chenkai00 2020-06-13
Lucianoesu 2020-06-08
tysforwork 2020-06-05
貌似掉线 2020-05-30
tysforwork 2020-05-27
CaptainCTR 2020-05-07
CaptainCTR 2020-05-04
貌似掉线 2020-05-03
CaptainCTR 2020-04-29
貌似掉线 2020-04-29
CaptainCTR 2020-04-23