Power Composer ;)
Go to file
Llewellyn van der Merwe 1afeb7c5fa
Update version to 2.0.2 and improve repository token handling
Bump the program version from 2.0.1 to 2.0.2. Enhance the repository token and API handling by allowing repository-specific [.api] and [.token] values to override global settings, with a fallback mechanism for global values. Added more comprehensive comments to clarify the override logic.
2024-10-07 18:18:11 +02:00
config Add option to display and add Joomla framework classes. 2024-05-22 14:00:41 +02:00
src Update version to 2.0.2 and improve repository token handling 2024-10-07 18:18:11 +02:00
.gitignore Initial commit of OctoJpack 2021-06-08 08:20:21 +02:00
LICENSE Initial commit of OctoJpack 2021-06-08 08:20:21 +02:00
README.md First release of OctoPower. 2024-05-22 11:35:38 +02:00

OctoPower - Easy JCB Powers to Composer PHP package

With this script we can easily package multiple power classes in an automated way from a json configuration file, and environment variables into a composer package.

program only for ubuntu/debian and Gitea systems at this time (should you like to use it on other OS's please open and issue...)


Install

$ sudo curl -L "https://git.vdm.dev/api/v1/repos/octoleo/octopower/raw/src/octopower" -o /usr/local/bin/octopower
$ sudo chmod +x /usr/local/bin/octopower

Usage

To see the help menu

$ octopower -h

Help Menu (octopower)

Usage: octopower [OPTION...]
	Options
	======================================================
   -p | --packager=<packager Name>
    Packager name
    example: octopower -p="Vast Development Method"
    ======================================================
   -pu | --packager-url=<//packager.url>
    Packager url
    example: octopower -pu="https://git.vdm.dev/"
    ======================================================
   -md | --main-dir=<path>
    load the main working directory
    example: octopower --main-dir=/src
    ======================================================
   -e | --env=<file>
    load the environment variables file
    example: octopower --env=/src/.env
    ======================================================
   --conf | --config=<path/url>
    load the configuration for the package in json format
       file-example: src/example.json
    example: octopower --config=config.json
    ======================================================
   -ld | --licence-dir=<path>
    load the licence directory
    example: octopower --licence-dir=/src/licence
    ======================================================
   -t | --token=<access_token>
    load the global token
    example: octopower --token=xxxxxxxxxxxxxxxxxxxxxxxxx
    ======================================================
   -u | --url=<gitea>
    Global url of the Gitea instance
    example: octopower --url="git.vdm.dev"
    ======================================================
   -a | --api=<//gitea.api>
    Global api of the Gitea instance
    example: octopower --api="https://git.vdm.dev/api/v1"
    ======================================================
   -q | --quiet
    mute all output messages
    example: octopower --quiet
    ======================================================
   --update
    to update your install
    example: octopower --update
    ======================================================
   --uninstall
    to uninstall this script
    example: octopower --uninstall
    ======================================================
   -h|--help
    display this help menu
    example: octopower -h
    example: octopower --help
    ======================================================
                    OctoPower v1.0.0
    ======================================================

Local Environment Variables File

Give the path to your .env file to the program like this:

$ octopower --env="/home/username/.config/octopower/custom.env"

Or with an environment variable you set before using the program like this:

$ export VDM_ENV_FILE_PATH="/home/username/.config/octopower/custom.env"

Default path is: /home/$USER/.config/octopower/.env

API ACCESS TOKEN (never share your token)

You can set your API access token for Gitea via the .env file like this:

VDM_GLOBAL_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxx"

Or you can pass the token directly to the script like this:

$ octopower --token="xxxxxxxxxxxxxxxxxxxxxxxxx"

Or with an environment variable you set before using the program like this:

$ export VDM_GLOBAL_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxx"

Configuration File

To see the example of the json configuration options check out config/octopower.json.

You can set your configuration file path via the .env file like this:

VDM_PACKAGE_CONF_FILE="/home/username/.config/octopower/package_name_config.json"

Or you can pass it to the program by URL:

$ octopower --conf="https://git.vdm.dev/api/v1/repos/octoleo/octopower/raw/config/octopower.json"

Or via a local file path:

$ octopower --conf="/home/username/.config/octopower/package_name_config.json"

Or with an environment variable you set before using the program like this:

$ export VDM_PACKAGE_CONF_FILE="/home/username/.config/octopower/package_name_config.json"

Uninstall

$ octopower --uninstall

Free Software License

@copyright  Copyright (C) 2021 Llewellyn van der Merwe. All rights reserved.
@license    GNU General Public License version 2; see LICENSE