Browse Source

Added the 'thenshim' and 'tink_cli' libraries

tags/v1.1.0
Cédric Belin 2 months ago
parent
commit
35315b72ea
5 changed files with 37 additions and 4 deletions
  1. +2
    -0
      build.hxml
  2. +12
    -0
      haxelib.json
  3. +7
    -0
      tool/install.ps1
  4. +3
    -2
      tool/upgrade.ps1
  5. +13
    -2
      tool/version.ps1

+ 2
- 0
build.hxml View File

@@ -3,5 +3,7 @@
--define analyzer-optimize
--define php-lib=src
--define real-position
--library thenshim
--library tink_cli
--main Main
--php .

+ 12
- 0
haxelib.json View File

@@ -0,0 +1,12 @@
{
"classPath": "src/",
"contributors": ["cedx"],
"dependencies": {"thenshim": "1.1.0", "tink_cli": "0.5.1"},
"description": "Provides the Haxe standard library as a reusable package.",
"license": "MIT",
"name": "haxe.php",
"releasenote": "Added the 'thenshim' and 'tink_cli' libraries.",
"tags": ["haxe", "php", "standard-library"],
"url": "https://docs.belin.io/haxe.php",
"version": "1.1.0"
}

+ 7
- 0
tool/install.ps1 View File

@@ -0,0 +1,7 @@
#!/usr/bin/env pwsh
Set-StrictMode -Version Latest
Set-Location (Split-Path $PSScriptRoot)

composer install --no-interaction
haxelib newrepo
haxelib install all --always

+ 3
- 2
tool/upgrade.ps1 View File

@@ -6,5 +6,6 @@ git reset --hard
git fetch --all --prune
git pull --rebase

$composer = $IsWindows ? 'php "C:/Program Files/PHP/share/composer.phar"' : "composer"
Invoke-Expression "$composer update --no-interaction"
composer update --no-interaction
haxelib install all --always
haxelib update --always

+ 13
- 2
tool/version.ps1 View File

@@ -2,5 +2,16 @@
Set-StrictMode -Version Latest
Set-Location (Split-Path $PSScriptRoot)

$version = (Get-Content composer.json | ConvertFrom-Json -AsHashTable).version
(Get-Content etc/phpdoc.xml) -replace 'version number="\d+(\.\d+){2}"', "version number=""$version""" | Out-File etc/phpdoc.xml
function Update-File {
param (
[Parameter(Mandatory = $true, Position = 0)] [String] $file,
[Parameter(Mandatory = $true, Position = 1)] [String] $pattern,
[Parameter(Mandatory = $true, Position = 2)] [String] $replacement
)

(Get-Content $file) -replace $pattern, $replacement | Out-File $file
}

$version = (Get-Content haxelib.json | ConvertFrom-Json).version
Update-File composer.json '"version": "\d+(\.\d+){2}"' """version"": ""$version"""
Update-File etc/phpdoc.xml 'version number="\d+(\.\d+){2}"' "version number=""$version"""

Loading…
Cancel
Save