Skip to content

Commit 232da51

Browse files
authored
Merge pull request #115 from zephir-lang/development
1.3.8
2 parents 9894681 + d1e65f7 commit 232da51

18 files changed

+996
-397
lines changed

.appveyor.yml

Lines changed: 0 additions & 159 deletions
This file was deleted.

.ci/AppVeyor.psm1

Lines changed: 0 additions & 75 deletions
This file was deleted.

.ci/build-win32.bat

Lines changed: 0 additions & 19 deletions
This file was deleted.

.ci/lemon-parser.ps1

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This file is part of the Zephir Parser.
2+
#
3+
# (c) Zephir Team <team@zephir-lang.com>
4+
#
5+
# For the full copyright and license information, please view
6+
# the LICENSE file that was distributed with this source code.
7+
8+
Write-Output "-- Compiling Lemon parser..."
9+
$LemonSrc = Join-Path -Path './parser' -ChildPath 'lemon.c'
10+
$LemonBin = Join-Path -Path './parser' -ChildPath 'lemon.exe'
11+
12+
if ($IsWindows) {
13+
& cl /Fe${LemonExe} ${LemonSrc}
14+
}
15+
else {
16+
$LemonBin = Join-Path -Path './parser' -ChildPath 'lemon'
17+
& gcc ${LemonSrc} -o ${LemonBin}
18+
}
19+
& ${LemonBin} -x
20+
21+
Write-Output "-- Cleanup initial file state..."
22+
23+
$AutoFiles = "./parser/zephir.c",
24+
"./parser/zephir.h",
25+
"./parser/parser.c",
26+
"./parser/scanner.c"
27+
28+
foreach ($GeneratedFile in $AutoFiles) {
29+
if (Test-Path -Path $GeneratedFile) {
30+
Remove-Item $GeneratedFile
31+
}
32+
}
33+
34+
Write-Output "-- Run re2c..."
35+
& re2c -o (Join-Path -Path './parser' -ChildPath 'scanner.c') (Join-Path -Path './parser' -ChildPath 'scanner.re')
36+
37+
Write-Output "-- Generating zephir.c file with lemon parser..."
38+
& ${LemonBin} -s (Join-Path -Path './parser' -ChildPath 'zephir.lemon')
39+
40+
Write-Output "-- Generating parser.c file..."
41+
$ParserC = Join-Path -Path './parser' -ChildPath 'parser.c'
42+
$ZephirC = Join-Path -Path './parser' -ChildPath 'zephir.c'
43+
$BaseC = Join-Path -Path './parser' -ChildPath 'base.c'
44+
Set-Content -Path ${ParserC} -Value '#include <php.h>'
45+
Get-Content ${ZephirC}, ${BaseC} | Add-Content ${ParserC}

.ci/release-notes.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env bash
2+
3+
# This file is part of the Zephir Parser.
4+
#
5+
# (c) Zephir Team <team@zephir-lang.com>
6+
#
7+
# For the full copyright and license information, please view
8+
# the LICENSE file that was distributed with this source code.
9+
10+
11+
# -e Exit immediately if a command exits with a non-zero status.
12+
# -u Treat unset variables as an error when substituting.
13+
14+
set -eu
15+
set -o pipefail
16+
17+
# Get Release notes for the latest release from CHANGELOG.md
18+
# How to use:
19+
# release-notes.sh CHANGELOG.md
20+
21+
startline=$(cat "$1" | grep -nE '^### ' | head -n 1 | cut -d ":" -f 1)
22+
finishline=$(($(cat "$1" | grep -nE '^## \[[0-9]+' | head -n 2 | tail -n 1 | cut -d ":" -f 1) - 1))
23+
changelog=$(sed -n "${startline},${finishline}p" "$1");
24+
25+
26+
: "${GITHUB_ACTIONS:=0}"
27+
28+
if [ "$GITHUB_ACTIONS" = "true" ]
29+
then
30+
changelog="${changelog//'%'/'%25'}"
31+
changelog="${changelog//$'\n'/'%0A'}"
32+
changelog="${changelog//$'\r'/'%0D'}"
33+
fi
34+
35+
echo "${changelog}"

0 commit comments

Comments
 (0)