-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
69 lines (69 loc) · 2.83 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
os: Visual Studio 2019
environment:
ID: postfixcodecompletion
PLUGIN_VERSION: 2.0
PLUGIN_NAME: PostfixCodeCompletion
PLUGIN_DESC:
PLUGIN_PATH: C:\projects\FlashDevelop\External\Plugins\PostfixCodeCompletion
PLUGIN_DLL: C:\projects\FlashDevelop\FlashDevelop\Bin\Debug\Plugins\PostfixCodeCompletion.dll
PLUGIN_INFO:
PLUGIN_GITHUB_RELEASES: https:\/\/github.com\/SlavaRa\/fdplugin-postfix-code-completion\/releases
APPMAN_TEMPLATE: C:\projects\FlashDevelop\External\Plugins\PostfixCodeCompletion\appman.template
APPMAN_CONFIG_XML: appman.txt
FD_PATH: C:\projects\FlashDevelop
FD_EXECUTABLE_DIR: FlashDevelop\Bin\Debug
FD_SETTINGS: C:\Users\appveyor\AppData\Local\FlashDevelop
version: $(PLUGIN_VERSION).{build}
skip_tags: true
init:
- git clone -q --branch=feature/Plugins-PCC https://github.com/SlavaRa/flashdevelop-plugins.git %FD_PATH%
matrix:
fast_finish: true
build: off
build_script:
- cd c:\
- mv %APPVEYOR_BUILD_FOLDER%/* %PLUGIN_PATH%
- cd %FD_PATH%\
- nuget restore
- msbuild /p:Configuration=Debug+Tests /p:Platform=x86 /v:m
- mkdir %FD_SETTINGS%
- cp -r %FD_PATH%\%FD_EXECUTABLE_DIR%\Settings %FD_SETTINGS%\Settings
- cp -r %FD_PATH%\%FD_EXECUTABLE_DIR%\Snippets %FD_SETTINGS%\Snippets
- nunit3-console.exe %FD_PATH%\%FD_EXECUTABLE_DIR%\%PLUGIN_NAME%.Tests.dll --result=myresults.xml;format=AppVeyor
after_build:
- mkdir %APPVEYOR_BUILD_FOLDER%\$(BaseDir)\Plugins
- mv %PLUGIN_DLL% %APPVEYOR_BUILD_FOLDER%\$(BaseDir)\Plugins\%PLUGIN_NAME%.dll
- mv %PLUGIN_PATH%\Snippets %APPVEYOR_BUILD_FOLDER%\$(BaseDir)\Snippets
- cd %APPVEYOR_BUILD_FOLDER%
- 7z a %PLUGIN_NAME%.zip $(BaseDir)\
- mv %PLUGIN_NAME%.zip %PLUGIN_NAME%.fdz
- rm -rf %APPVEYOR_BUILD_FOLDER%\$(BaseDir)
- md5sum %PLUGIN_NAME%.fdz > checksum.md5
- sed -e "s/.//" checksum.md5 > checksum.tmp.md5 && mv checksum.tmp.md5 checksum.md5
- sed -e "s/ .*//" checksum.md5 > checksum.tmp.md5 && mv checksum.tmp.md5 checksum.md5
- set /p CHECKSUM=<checksum.md5
- rm checksum.md5
- mv %APPMAN_TEMPLATE% %APPMAN_CONFIG_XML%
- sed -i -e "s/_ID_/%ID%/g" %APPMAN_CONFIG_XML%
- sed -i -e "s/_NAME_/%PLUGIN_NAME%/g" %APPMAN_CONFIG_XML%
- sed -i -e "s/_DESC_/%PLUGIN_DESC%/g" %APPMAN_CONFIG_XML%
- sed -i -e "s/_VERSION_/%PLUGIN_VERSION%/g" %APPMAN_CONFIG_XML%
- sed -i -e "s/_BUILD_/%APPVEYOR_BUILD_NUMBER%/g" %APPMAN_CONFIG_XML%
- sed -i -e "s/_INFO_/%PLUGIN_INFO%/g" %APPMAN_CONFIG_XML%
- sed -i -e "s/_URL_/%PLUGIN_GITHUB_RELEASES%\/download\/%APPVEYOR_BUILD_VERSION%\/%PLUGIN_NAME%.fdz/g" %APPMAN_CONFIG_XML%
- sed -i -e "s/_CHECKSUM_/%CHECKSUM%/g" %APPMAN_CONFIG_XML%
artifacts:
- path: $(PLUGIN_NAME).fdz
name: $(PLUGIN_NAME)
type: zip
- path: $(APPMAN_CONFIG_XML)
name: appman
type: txt
deploy:
- provider: GitHub
release: $(appveyor_build_version)
auth_token:
secure: HK9ej9WVysHQHeTEQ/QTOJmh08xCtDQyDBy5uXWrWV/xROMNkQrTeQv1j2tYOxVw
artifact: /(.*\.fdz)|(appman.txt)/
on:
branch: master