Skip to content

Commit

Permalink
v3.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Jul 4, 2021
1 parent 3b486b7 commit 7d778e5
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 94 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion haxelib.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": ""}
}
174 changes: 87 additions & 87 deletions tools/publish-release.cmd
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7d778e5

Please sign in to comment.