Compare commits
1 Commits
v0.0.3
...
EC-21-Offi
| Author | SHA1 | Date | |
|---|---|---|---|
|
3755878037
|
25
LICENSE
25
LICENSE
@@ -1,21 +1,8 @@
|
|||||||
MIT License
|
Copyright (c) 2026 Evercatch. All rights reserved.
|
||||||
|
|
||||||
Copyright (c) 2026 Evercatch
|
This software and its source code are proprietary and confidential.
|
||||||
|
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.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
For licensing enquiries, contact: legal@evercatch.io
|
||||||
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.
|
|
||||||
|
|||||||
71
Makefile
71
Makefile
@@ -1,71 +0,0 @@
|
|||||||
.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: ## Zip and PUT package to Gitea Composer registry (requires GITEA_TOKEN, GITEA_USER, VERSION)
|
|
||||||
ifndef GITEA_TOKEN
|
|
||||||
$(error GITEA_TOKEN is not set. Export it first: export GITEA_TOKEN=your_token)
|
|
||||||
endif
|
|
||||||
ifndef GITEA_USER
|
|
||||||
$(error GITEA_USER is not set. Export it first: export GITEA_USER=your_username)
|
|
||||||
endif
|
|
||||||
ifndef VERSION
|
|
||||||
$(error VERSION is not set. Usage: make gitea-publish VERSION=v0.1.0)
|
|
||||||
endif
|
|
||||||
$(eval SEMVER := $(shell echo $(VERSION) | sed 's/^v//'))
|
|
||||||
@echo "Creating zip from git archive..."
|
|
||||||
git archive --format=zip HEAD > /tmp/$(GITEA_REPO)-$(SEMVER).zip
|
|
||||||
@echo "Publishing $(SEMVER) to Gitea Composer registry..."
|
|
||||||
curl -s \
|
|
||||||
--user "$(GITEA_USER):$(GITEA_TOKEN)" \
|
|
||||||
--upload-file /tmp/$(GITEA_REPO)-$(SEMVER).zip \
|
|
||||||
"$(GITEA_URL)/api/packages/$(GITEA_OWNER)/composer?version=$(SEMVER)" \
|
|
||||||
| python3 -m json.tool || true
|
|
||||||
rm -f /tmp/$(GITEA_REPO)-$(SEMVER).zip
|
|
||||||
@echo "Done. Check: $(GITEA_URL)/$(GITEA_OWNER)/$(GITEA_REPO)/packages"
|
|
||||||
@@ -12,12 +12,6 @@
|
|||||||
"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