From 672de694eec90f39915586bd956b78872bc9746f Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Tue, 18 Jun 2024 10:00:11 +0900 Subject: [PATCH] Readme file update --- ReadMe.md | 37 +++++++++++++++++++++++++++++++------ publish/publish.sh | 2 +- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index f11fa83..922d56f 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -9,16 +9,41 @@ For local install only - Template\SmartyExtended - Admin\EditBase -## Setup from central composer +## Publish to gitea or gitlab server -Setup from gitea internal servers +Currently there are only gitea and gitlab supported, github does not have support for composer packages -```sh -composer config repositories.git.egplusww.jp.Composer composer https://git.egplusww.jp/api/packages/Composer/composer +`publish\publish.sh go` will run the publish script + +All the configuration is done in the `publish\.env.deploy` file + +```ini +# downlaod file name is "Repository name" "-" "version" where +# version is "vN.N.N" +GITEA_PUBLISH=1 +GITEA_UPLOAD_FILENAME="Upload-File-Name"; +GITEA_USER=gitea-user +GITEA_TOKEN=gitea-tokek +GITEA_URL_DL=https://[gitea.hostname]/[to/package/folder]/archive +GITEA_URL_PUSH=https://[gitea.hostname]/api/packages/[organization]/composer + +GITLAB_PUBLISH=1 +GITLAB_URL=gitlab URl to repository +GITLAB_DEPLOY_TOKEN=gitlab-token ``` -Alternative setup composer local zip file repot: -`composer config repositories.composer.egplusww.jp composer http://composer.egplusww.jp` +At the moment there is only one gitea or gitlab target setable + +## Setup from central composer + +Setup from gitea servers + +[hostname] is the hostname for your gitea server (or wherever this is published) +[OrgName] is the organization name where the composer packages are hosted + +```sh +composer config repositories.[hostname].Composer composer https://[hostname]/api/packages/[OrgName]/composer +``` ## Install package diff --git a/publish/publish.sh b/publish/publish.sh index 4f58fcc..318c062 100755 --- a/publish/publish.sh +++ b/publish/publish.sh @@ -88,7 +88,7 @@ if [ ! -z "${GITLAB_PUBLISH}" ]; then "${GITLAB_URL}"; echo "${VERSION}" > "${file_last_published}"; else - echo "Missing GITLAB_DEPLOY_TOKEN environment variable"; + echo "Missing GITLAB_URL or GITLAB_DEPLOY_TOKEN environment variable"; fi; fi; echo "";