Ship swagger files with installers

This commit is contained in:
Antoine Gersant 2019-04-07 23:41:24 -07:00
parent 69c8c93277
commit bf67ccfda8
3 changed files with 7 additions and 1 deletions

View file

@ -34,9 +34,13 @@ Copy-Item .\docs\swagger .\release\tmp\swagger -recurse
"" ""
"Creating installer" "Creating installer"
heat dir .\release\tmp\web\ -ag -g1 -dr AppDataPolaris -cg WebUI -sfrag -var wix.WebUIDir -out .\release\tmp\web_ui_fragment.wxs heat dir .\release\tmp\web\ -ag -g1 -dr AppDataPolaris -cg WebUI -sfrag -var wix.WebUIDir -out .\release\tmp\web_ui_fragment.wxs
heat dir .\release\tmp\swagger\ -ag -g1 -dr AppDataPolaris -cg SwaggerUI -sfrag -var wix.SwaggerUIDir -out .\release\tmp\swagger_ui_fragment.wxs
candle -wx -ext WixUtilExtension -arch x64 -out .\release\tmp\web_ui_fragment.wixobj .\release\tmp\web_ui_fragment.wxs candle -wx -ext WixUtilExtension -arch x64 -out .\release\tmp\web_ui_fragment.wixobj .\release\tmp\web_ui_fragment.wxs
candle -wx -ext WixUtilExtension -arch x64 -out .\release\tmp\swagger_ui_fragment.wixobj .\release\tmp\swagger_ui_fragment.wxs
candle -wx -ext WixUtilExtension -arch x64 -out .\release\tmp\installer.wixobj .\res\windows\installer\installer.wxs candle -wx -ext WixUtilExtension -arch x64 -out .\release\tmp\installer.wixobj .\res\windows\installer\installer.wxs
light -dWebUIDir=".\release\tmp\web" -wx -ext WixUtilExtension -ext WixUIExtension -spdb -sw1076 -sice:ICE38 -sice:ICE64 -out .\release\Polaris_$POLARIS_VERSION.msi .\release\tmp\installer.wixobj .\release\tmp\web_ui_fragment.wixobj
light -dWebUIDir=".\release\tmp\web" -dSwaggerUIDir=".\release\tmp\swagger" -wx -ext WixUtilExtension -ext WixUIExtension -spdb -sw1076 -sice:ICE38 -sice:ICE64 -out .\release\Polaris_$POLARIS_VERSION.msi .\release\tmp\installer.wixobj .\release\tmp\web_ui_fragment.wixobj .\release\tmp\swagger_ui_fragment.wixobj
"Cleaning up" "Cleaning up"
Remove-Item -Recurse .\release\tmp Remove-Item -Recurse .\release\tmp

View file

@ -11,6 +11,7 @@ install: build
install -d $(POLARIS_DATA_DIR) install -d $(POLARIS_DATA_DIR)
install ./target/release/polaris $(POLARIS_BIN_DIR) install ./target/release/polaris $(POLARIS_BIN_DIR)
cp -r ./web $(POLARIS_DATA_DIR) cp -r ./web $(POLARIS_DATA_DIR)
cp -r ./swagger $(POLARIS_DATA_DIR)
@echo "Polaris installation complete!" @echo "Polaris installation complete!"
clean: clean:

View file

@ -52,6 +52,7 @@
<ComponentRef Id='ProgramMenuDir' /> <ComponentRef Id='ProgramMenuDir' />
<ComponentRef Id='CleanupExtraData' /> <ComponentRef Id='CleanupExtraData' />
<ComponentGroupRef Id="WebUI" /> <ComponentGroupRef Id="WebUI" />
<ComponentGroupRef Id="SwaggerUI" />
</Feature> </Feature>
<Icon Id='polaris.exe' SourceFile='polaris.exe' /> <Icon Id='polaris.exe' SourceFile='polaris.exe' />