Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
caadc5545d
|
25
LICENSE
25
LICENSE
@@ -1,8 +1,21 @@
|
|||||||
Copyright (c) 2026 Evercatch. All rights reserved.
|
MIT License
|
||||||
|
|
||||||
This software and its source code are proprietary and confidential.
|
Copyright (c) 2026 Evercatch
|
||||||
Unauthorised copying, distribution, modification, or use of this software,
|
|
||||||
in whole or in part, via any medium, is strictly prohibited without the
|
|
||||||
prior written permission of Evercatch.
|
|
||||||
|
|
||||||
For licensing enquiries, contact: legal@evercatch.io
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|||||||
61
Makefile
Normal file
61
Makefile
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
.PHONY: help install tag publish packagist-update gitea-publish
|
||||||
|
|
||||||
|
GITEA_URL := https://git.psmattas.com
|
||||||
|
GITEA_OWNER := Evercatch
|
||||||
|
GITEA_REPO := evercatch-php
|
||||||
|
PACKAGIST_VENDOR := evercatch
|
||||||
|
PACKAGIST_PACKAGE := evercatch-php
|
||||||
|
|
||||||
|
# Read current version from git tags
|
||||||
|
VERSION := $(shell git describe --tags --abbrev=0 2>/dev/null || echo "none")
|
||||||
|
|
||||||
|
help: ## Show this help
|
||||||
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
||||||
|
@echo ""
|
||||||
|
@echo " Current version: $(VERSION)"
|
||||||
|
|
||||||
|
install: ## Install dependencies via Composer
|
||||||
|
composer install
|
||||||
|
|
||||||
|
# Usage: make tag VERSION=v0.1.0
|
||||||
|
tag: ## Create and push a git tag (VERSION=v0.x.x required)
|
||||||
|
ifndef VERSION
|
||||||
|
$(error VERSION is not set. Usage: make tag VERSION=v0.1.0)
|
||||||
|
endif
|
||||||
|
@echo "Tagging $(VERSION)..."
|
||||||
|
git tag -a $(VERSION) -m "Release $(VERSION)"
|
||||||
|
git push origin $(VERSION)
|
||||||
|
@echo "Tag $(VERSION) pushed."
|
||||||
|
|
||||||
|
# Usage: make publish VERSION=v0.1.0
|
||||||
|
publish: ## Tag, push, update Packagist, and publish to Gitea (VERSION=v0.x.x required)
|
||||||
|
ifndef VERSION
|
||||||
|
$(error VERSION is not set. Usage: make publish VERSION=v0.1.0)
|
||||||
|
endif
|
||||||
|
$(MAKE) tag VERSION=$(VERSION)
|
||||||
|
$(MAKE) packagist-update
|
||||||
|
$(MAKE) gitea-publish VERSION=$(VERSION)
|
||||||
|
|
||||||
|
packagist-update: ## Trigger a Packagist crawl (requires PACKAGIST_TOKEN env var)
|
||||||
|
ifndef PACKAGIST_TOKEN
|
||||||
|
$(error PACKAGIST_TOKEN is not set. Export it first: export PACKAGIST_TOKEN=your_token)
|
||||||
|
endif
|
||||||
|
@echo "Triggering Packagist update..."
|
||||||
|
curl -s -X POST \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"repository":{"url":"$(GITEA_URL)/$(GITEA_OWNER)/$(GITEA_REPO)"}}' \
|
||||||
|
"https://packagist.org/api/update-package?username=$(PACKAGIST_VENDOR)&apiToken=$(PACKAGIST_TOKEN)" \
|
||||||
|
| python3 -m json.tool || true
|
||||||
|
@echo "Packagist notified."
|
||||||
|
|
||||||
|
gitea-publish: ## Publish current tagged version to Gitea Composer registry (requires GITEA_TOKEN env var)
|
||||||
|
ifndef GITEA_TOKEN
|
||||||
|
$(error GITEA_TOKEN is not set. Export it first: export GITEA_TOKEN=your_token)
|
||||||
|
endif
|
||||||
|
@echo "Publishing to Gitea Composer registry..."
|
||||||
|
curl -s -X POST \
|
||||||
|
-H "Authorization: token $(GITEA_TOKEN)" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
"$(GITEA_URL)/api/v1/repos/$(GITEA_OWNER)/$(GITEA_REPO)/tags" \
|
||||||
|
| python3 -m json.tool || true
|
||||||
|
@echo "Done. Check: $(GITEA_URL)/$(GITEA_OWNER)/$(GITEA_REPO)/packages"
|
||||||
@@ -12,6 +12,12 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.0"
|
"php": ">=8.0"
|
||||||
},
|
},
|
||||||
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "composer",
|
||||||
|
"url": "https://git.psmattas.com/api/packages/Evercatch/composer"
|
||||||
|
}
|
||||||
|
],
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Evercatch\\": "src/"
|
"Evercatch\\": "src/"
|
||||||
|
|||||||
Reference in New Issue
Block a user