17 - sh: if [ "${CONFIGURATION}" = "Debug" ] ; then exit 0; fi
18 - sh: if [ "${PLATFORM}" = "x86" ]; then exit 0; fi
23 - cmd: echo %APPVEYOR_BUILD_FOLDER%
25 - cmd: git submodule update --init
27 - cmd: cd %APPVEYOR_BUILD_FOLDER%\libusb
31 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" = "macOS" ]; then brew install libusb libzip pkg-config; fi
33 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then sudo apt-get update; fi
35 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install libusb-1.0-0-dev libzip-dev libbz2-dev asciidoc rename; fi
39 # below powershell actions equals to retarget projects to newest SDK and tool v142 in visual studio 2019
40 - ps: If($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") {(gc msvc\uuu.vcxproj) -replace '141', '142' | Out-File -encoding ASCII msvc\uuu.vcxproj}
41 - ps: If($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") {(gc msvc\uuu.vcxproj) -replace '10.0.16299.0', '10.0' | Out-File -encoding ASCII msvc\uuu.vcxproj}
42 - ps: If($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") {(gc msvc\bzip2.vcxproj) -replace '141', '142' | Out-File -encoding ASCII msvc\bzip2.vcxproj}
43 - ps: If($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") {(gc msvc\bzip2.vcxproj) -replace '10.0.16299.0', '10.0' | Out-File -encoding ASCII msvc\bzip2.vcxproj}
44 - ps: If($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") {(gc msvc\libuuu.vcxproj) -replace '141', '142' | Out-File -encoding ASCII msvc\libuuu.vcxproj}
45 - ps: If($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") {(gc msvc\libuuu.vcxproj) -replace '10.0.16299.0', '10.0' | Out-File -encoding ASCII msvc\libuuu.vcxproj}
46 - ps: If($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") {(gc msvc\zlib.vcxproj) -replace '141', '142' | Out-File -encoding ASCII msvc\zlib.vcxproj}
47 - ps: If($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") {(gc msvc\zlib.vcxproj) -replace '10.0.16299.0', '10.0' | Out-File -encoding ASCII msvc\zlib.vcxproj}
48 - ps: If($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") {(gc libusb\msvc\libusb_dll_2017.vcxproj) -replace '10.0.16299.0', '10.0' | Out-File -encoding ASCII libusb\msvc\libusb_dll_2017.vcxproj}
49 - ps: If($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") {(gc libusb\msvc\libusb_dll_2017.vcxproj) -replace '141', '142' | Out-File -encoding ASCII libusb\msvc\libusb_dll_2017.vcxproj}
50 - ps: If($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") {(gc msvc\uuu-static-link.vcxproj) -replace '141', '142' | Out-File -encoding ASCII msvc\uuu-static-link.vcxproj}
51 - ps: If($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") {(gc msvc\uuu-static-link.vcxproj) -replace '10.0.16299.0', '10.0' | Out-File -encoding ASCII msvc\uuu-static-link.vcxproj}
52 - ps: If($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") {(gc libusb\msvc\libusb_static_2017.vcxproj) -replace '10.0.16299.0', '10.0' | Out-File -encoding ASCII libusb\msvc\libusb_static_2017.vcxproj}
53 - ps: If($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") {(gc libusb\msvc\libusb_static_2017.vcxproj) -replace '141', '142' | Out-File -encoding ASCII libusb\msvc\libusb_static_2017.vcxproj}
56 - cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2019" (msbuild %APPVEYOR_BUILD_FOLDER%/msvc/uuu.sln /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll")
57 #coverity tool is only available to visual studio 2017 imagine in appveyor
58 - cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" (cov-build --dir cov-int msbuild %APPVEYOR_BUILD_FOLDER%/msvc/uuu.sln /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll")
60 - cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" (7z a -tzip mfg.zip cov-int)
62 - cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" (curl --form token=%coverity_token% --form email=frank.li@nxp.com --form file=@mfg.zip --form version="automation test" --form description="testing coverity automation" https://scan.coverity.com/builds?project=NXPmicro%2Fmfgtools)
64 - cmd: git clean -dxf .
66 - cmd: msbuild %APPVEYOR_BUILD_FOLDER%/msvc/uuu-static-link.sln /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
68 - cmd: if exist %APPVEYOR_BUILD_FOLDER%\msvc\x64\release\uuu.exe cp %APPVEYOR_BUILD_FOLDER%\msvc\x64\release\uuu.exe %APPVEYOR_BUILD_FOLDER%\uuu.exe
70 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" = "macOS" ]; then export PATH="/usr/local/Cellar/pkg-config/0.29.2_3/bin:${PATH}"; pkg-config --list-all; cmake -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/openssl; else cmake -D 'STATIC=1' .; fi
72 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" = "macOS" ]; then ls uuu; mv uuu/uuu uuu/uuu_mac; fi
74 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then git submodule init; fi
75 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then git submodule update; fi
76 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then git archive --prefix "uuu-${APPVEYOR_BUILD_VERSION}/" -o "uuu_source-${APPVEYOR_BUILD_VERSION}.tar" HEAD ; fi
77 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then git submodule foreach --recursive "git archive --prefix=uuu-${APPVEYOR_BUILD_VERSION}/\$path/ --output=\$sha1.tar HEAD && tar --concatenate --file=$(pwd)/uuu_source-${APPVEYOR_BUILD_VERSION}.tar \$sha1.tar && rm \$sha1.tar" ; fi
78 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then mkdir uuu-${APPVEYOR_BUILD_VERSION}; git describe --tags --long >uuu-${APPVEYOR_BUILD_VERSION}/.tarball-version ; fi
79 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then tar -r uuu-${APPVEYOR_BUILD_VERSION}/.tarball-version -f uuu_source-${APPVEYOR_BUILD_VERSION}.tar ; fi
80 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then gzip uuu_source-${APPVEYOR_BUILD_VERSION}.tar; fi
81 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then tar xzf uuu_source-${APPVEYOR_BUILD_VERSION}.tar.gz && zip uuu_source-${APPVEYOR_BUILD_VERSION}.zip $(tar tf uuu_source-${APPVEYOR_BUILD_VERSION}.tar.gz); fi
83 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then git clone https://github.com/NXPmicro/mfgtools.wiki.git; fi
85 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then cd mfgtools.wiki; fi
87 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then rename -f 's/\.asciidoc$//' *; fi
89 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then echo "<revhistory>" > UUU-docinfo.xml; fi
91 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then git log -n25 --reverse --format="format:<revision><revnumber>%h</revnumber><date>%cd</date><authorinitials>%an</authorinitials><revremark>%s</revremark></revision>" >> UUU-docinfo.xml; fi
93 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then echo "</revhistory>" >> UUU-docinfo.xml; fi
95 - sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then a2x -L -a docinfo UUU; fi
101 - path: mfgtools.wiki/UUU.pdf
102 - path: uuu_source-${APPVEYOR_BUILD_VERSION}.tar.gz
103 - path: uuu_source-${APPVEYOR_BUILD_VERSION}.zip
109 description: prebuild for $(APPVEYOR_REPO_COMMIT) \n\n $(APPVEYOR_REPO_COMMIT_MESSAGE)
111 secure: SWWVkwSfPyVIaPChBBl+uAA3Fau9Rl5iNPQ9VRL8yyggXvc6wPcr/O9iXBMVM7Ju
112 artifact: uuu.exe; uuu/uuu; uuu/uuu_mac; mfgtools.wiki/UUU.pdf; uuu_source-${APPVEYOR_BUILD_VERSION}.tar.gz; uuu_source-${APPVEYOR_BUILD_VERSION}.zip
117 secure: 5VvyV4fYfI6xPsqaeDHvBamkUmmVNjZj0J5pLLQ6NCw=