Add deploy task

This commit is contained in:
Alexey Golubev
2019-01-14 14:44:46 +03:00
parent 476d772180
commit d78e8b4e97
3 changed files with 46 additions and 1 deletions

1
.gitignore vendored
View File

@ -6,6 +6,7 @@ win-linux/ASCDocumentEditor.build/*
win-linux/*.user
win-linux/package/linux/index.html
win-linux/package/windows/index.html
common/loginpage/build/node_modules/*
common/converter/*

View File

@ -16,9 +16,16 @@ ifneq ($(filter %86,$(UNAME_M)),)
endif
PUBLISHER_NAME ?= Ascensio System SIA
PACKAGE_NAME := onlyoffice-desktopeditors
PACKAGE_VERSION ?= 0.0.0
BUILD_NUMBER ?= 0
PACKAGE_VERSION := $(PACKAGE_VERSION).$(BUILD_NUMBER)
SIGN_STR := "byparam=signtool.exe sign /v /n $(word 1, $(PUBLISHER_NAME)) /t http://timestamp.verisign.com/scripts/timstamp.dll \$$f"
S3_BUCKET ?= repo-doc-onlyoffice-com
WIN_REPO_DIR := windows
DESKTOP_EDITORS_EXE = win-linux/package/windows/DesktopEditors$(OS_ARCH).exe
DESKTOP_EDITORS_ZIP = win-linux/package/windows/DesktopEditors$(OS_ARCH).zip
@ -31,6 +38,8 @@ WINSPARKLE := win-linux/windows/data/winsparkle/WinSparkle.dll
WINSPARKLE_URL := https://github.com/vslavik/winsparkle/releases/download/v0.6.0/WinSparkle-0.6.0.zip
WINSPARKLE_ARCH := WinSparkle-0.6.0.zip
INDEX_HTML := win-linux/package/windows/index.html
$(DESKTOP_EDITORS_EXE): $(DEST_DIR) $(VCREDIST) $(WINSPARKLE)
$(DESKTOP_EDITORS_ZIP): $(DEST_DIR)
@ -62,4 +71,28 @@ package: $(PACKAGES)
#zip: $(DESKTOP_EDITORS_ZIP)
clean-package:
rm -f $(PACKAGES) $(WINSPARKLE_ARCH) $(WINSPARKLE) $(VCREDIST)
rm -f $(PACKAGES) $(WINSPARKLE_ARCH) $(WINSPARKLE) $(VCREDIST) $(INDEX_HTML)
deploy: $(PACKAGES) $(INDEX_HTML)
aws s3 cp \
$(DESKTOP_EDITORS_EXE) \
s3://$(S3_BUCKET)/$(WIN_REPO_DIR)/$(PACKAGE_NAME)/$(PACKAGE_VERSION)/ \
--acl public-read
aws s3 cp \
$(DESKTOP_EDITORS_ZIP) \
s3://$(S3_BUCKET)/$(WIN_REPO_DIR)/$(PACKAGE_NAME)/$(PACKAGE_VERSION)/ \
--acl public-read
aws s3 cp \
s3://$(S3_BUCKET)/$(WIN_REPO_DIR)/$(PACKAGE_NAME)/$(PACKAGE_VERSION)/* \
s3://$(S3_BUCKET)/$(WIN_REPO_DIR)/$(PACKAGE_NAME)/latest/ \
--acl public-read
M4_PARAMS += -D M4_S3_BUCKET=$(S3_BUCKET)
M4_PARAMS += -D M4_WIN_ARCH=$(S3_BUCKET)
M4_PARAMS += -D M4_EXE_URI="$(WIN_REPO_DIR)/$(PACKAGE_NAME)/$(PACKAGE_VERSION)/$(notdir $(DESKTOP_EDITORS_EXE))"
M4_PARAMS += -D M4_ZIP_URI="$(WIN_REPO_DIR)/$(PACKAGE_NAME)/$(PACKAGE_VERSION)/$(notdir $(DESKTOP_EDITORS_ZIP))"
% : %.m4
m4 $(M4_PARAMS) $< > $@

View File

@ -0,0 +1,11 @@
<html>
<body>
<p>Win M4_WIN_ARCH-bit installer
<a href="https://M4_S3_BUCKET.s3-eu-west-1.amazonaws.com/M4_EXE_URI">deb</a>
</p>
<p>Win M4_WIN_ARCH-bit archive
<a href="https://M4_S3_BUCKET.s3-eu-west-1.amazonaws.com/M4_ZIP_URI">rpm</a>
</p>
</body>
</html>