diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ebb5e6..06ab3dc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,13 +22,13 @@ jobs: fail-fast: false matrix: os: - - ubuntu-latest - - macos-latest - - windows-latest + - ubuntu-latest + - macos-latest + - windows-latest haxe: - - 4.2.3 - - 4.1.5 - - 4.0.5 + - 4.2.3 + - 4.1.5 + - 4.0.5 steps: - name: Show environment variables diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cc0f4e..342a92b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [3.1.7] - 2021-07-04 + +### Fixed +- add missing extraParams.hxml to distribution + + ## [3.1.6] - 2021-07-04 ### Changed diff --git a/haxelib.json b/haxelib.json index 380be34..f0028b0 100644 --- a/haxelib.json +++ b/haxelib.json @@ -11,6 +11,6 @@ "description": "Python inspired doc-testing for Haxe. Allows unit-testing based on test assertions in haxedoc. Integrates with Haxe Unit, MUnit, Tink Testrunner and UTest", "contributors": ["vegardit"], "releasenote": "See https://github.com/vegardit/haxe-doctest/blob/main/CHANGELOG.md", - "version": "3.1.6", + "version": "3.1.7", "dependencies": {"hscript": ""} } diff --git a/tools/publish-release.cmd b/tools/publish-release.cmd index 5b74541..f4e38e5 100644 --- a/tools/publish-release.cmd +++ b/tools/publish-release.cmd @@ -1,87 +1,87 @@ -@echo off -REM Copyright (c) 2016-2021 Vegard IT GmbH (https://vegardit.com) and contributors. -REM SPDX-License-Identifier: Apache-2.0 -REM Author: Sebastian Thomschke, Vegard IT GmbH - -REM creates a new release in GitHub and haxelib.org - -where zip.exe /Q -if %errorlevel% neq 0 ( - echo Required command 'zip' not found. Download from http://www.info-zip.org/Zip.html#Downloads - exit /b 1 -) - -where wget.exe /Q -if %errorlevel% neq 0 ( - echo Required command 'wget' not found. Download from https://eternallybored.org/misc/wget/ - exit /b 1 -) - -if [%GITHUB_ACCESS_TOKEN%] == [] ( - echo Required environment variable GITHUB_ACCESS_TOKEN is not set! - exit /b 1 -) - -setlocal -set DRAFT=false -set PREPRELEASE=false - -REM cd into project root -pushd . -cd %~dp0.. - -REM extract GIT URL from haxelib.json -for /f "tokens=*" %%a in ( 'findstr url haxelib.json' ) do (set textLine=%%a) -set REPO_URL=%textLine:"url": "=% -set REPO_URL=%REPO_URL:",=% -set REPO_URL=%REPO_URL:"=% -echo REPO_URL=%REPO_URL% - -REM extract repo name from haxelib.json -set REPO_NAME=%REPO_URL:https://github.com/=% -echo REPO_NAME=%REPO_NAME% - -REM extract project version from haxelib.json -for /f "tokens=*" %%a in ( 'findstr version haxelib.json' ) do (set textLine=%%a) -set PROJECT_VERSION=%textLine:"version": "=% -set PROJECT_VERSION=%PROJECT_VERSION:",=% -set PROJECT_VERSION=%PROJECT_VERSION:"=% -echo PROJECT_VERSION=%PROJECT_VERSION% - -REM extract release note from haxelib.json -for /f "tokens=*" %%a in ( 'findstr releasenote haxelib.json' ) do (set textLine=%%a) -set RELEASE_NOTE=%textLine:"releasenote": "=% -set RELEASE_NOTE=%RELEASE_NOTE:",=% -set RELEASE_NOTE=%RELEASE_NOTE:"=% -echo RELEASE_NOTE=%RELEASE_NOTE% - -if not exist target mkdir target - -REM create haxelib release -if exist target\haxelib-upload.zip ( - del target\haxelib-upload.zip -) -echo Building haxelib release... -zip target\haxelib-upload.zip src haxelib.json LICENSE.txt CONTRIBUTING.md README.md -r -9 || goto :eof - -REM create github release https://developer.github.com/v3/repos/releases/#create-a-release -echo Creating GitHub release https://github.com/%REPO_NAME%/releases/tag/v%PROJECT_VERSION%... -( - echo { - echo "tag_name":"v%PROJECT_VERSION%", - echo "name":"v%PROJECT_VERSION%", - echo "target_commitish":"main", - echo "body":"%RELEASE_NOTE%", - echo "draft":%DRAFT%, - echo "prerelease":%PREPRELEASE% - echo } -)>target\github_release.json -wget -qO- --header="Authorization: token %GITHUB_ACCESS_TOKEN%" --post-file=target/github_release.json "https://api.github.com/repos/%REPO_NAME%/releases" || goto :eof - -REM submit haxelib release -echo Submitting haxelib release... -haxelib submit target\haxelib-upload.zip - -:eof -popd -endlocal +@echo off +REM Copyright (c) 2016-2021 Vegard IT GmbH (https://vegardit.com) and contributors. +REM SPDX-License-Identifier: Apache-2.0 +REM Author: Sebastian Thomschke, Vegard IT GmbH + +REM creates a new release in GitHub and haxelib.org + +where zip.exe /Q +if %errorlevel% neq 0 ( + echo Required command 'zip' not found. Download from http://www.info-zip.org/Zip.html#Downloads + exit /b 1 +) + +where wget.exe /Q +if %errorlevel% neq 0 ( + echo Required command 'wget' not found. Download from https://eternallybored.org/misc/wget/ + exit /b 1 +) + +if [%GITHUB_ACCESS_TOKEN%] == [] ( + echo Required environment variable GITHUB_ACCESS_TOKEN is not set! + exit /b 1 +) + +setlocal +set DRAFT=false +set PREPRELEASE=false + +REM cd into project root +pushd . +cd %~dp0.. + +REM extract GIT URL from haxelib.json +for /f "tokens=*" %%a in ( 'findstr url haxelib.json' ) do (set textLine=%%a) +set REPO_URL=%textLine:"url": "=% +set REPO_URL=%REPO_URL:",=% +set REPO_URL=%REPO_URL:"=% +echo REPO_URL=%REPO_URL% + +REM extract repo name from haxelib.json +set REPO_NAME=%REPO_URL:https://github.com/=% +echo REPO_NAME=%REPO_NAME% + +REM extract project version from haxelib.json +for /f "tokens=*" %%a in ( 'findstr version haxelib.json' ) do (set textLine=%%a) +set PROJECT_VERSION=%textLine:"version": "=% +set PROJECT_VERSION=%PROJECT_VERSION:",=% +set PROJECT_VERSION=%PROJECT_VERSION:"=% +echo PROJECT_VERSION=%PROJECT_VERSION% + +REM extract release note from haxelib.json +for /f "tokens=*" %%a in ( 'findstr releasenote haxelib.json' ) do (set textLine=%%a) +set RELEASE_NOTE=%textLine:"releasenote": "=% +set RELEASE_NOTE=%RELEASE_NOTE:",=% +set RELEASE_NOTE=%RELEASE_NOTE:"=% +echo RELEASE_NOTE=%RELEASE_NOTE% + +if not exist target mkdir target + +REM create haxelib release +if exist target\haxelib-upload.zip ( + del target\haxelib-upload.zip +) +echo Building haxelib release... +zip target\haxelib-upload.zip src extraParams.hxml haxelib.json LICENSE.txt CONTRIBUTING.md README.md -r -9 || goto :eof + +REM create github release https://developer.github.com/v3/repos/releases/#create-a-release +echo Creating GitHub release https://github.com/%REPO_NAME%/releases/tag/v%PROJECT_VERSION%... +( + echo { + echo "tag_name":"v%PROJECT_VERSION%", + echo "name":"v%PROJECT_VERSION%", + echo "target_commitish":"main", + echo "body":"%RELEASE_NOTE%", + echo "draft":%DRAFT%, + echo "prerelease":%PREPRELEASE% + echo } +)>target\github_release.json +wget -qO- --header="Authorization: token %GITHUB_ACCESS_TOKEN%" --post-file=target/github_release.json "https://api.github.com/repos/%REPO_NAME%/releases" || goto :eof + +REM submit haxelib release +echo Submitting haxelib release... +haxelib submit target\haxelib-upload.zip + +:eof +popd +endlocal