Giter VIP home page Giter VIP logo

pro-cli's Introduction

pro-cli's People

Contributors

chriha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pro-cli's Issues

project scripts with quotes don't work

An install script can be defined as

project compose exec db sh -c 'echo \"$MYSQL_ROOT_PASSWORD\"'

and becomes

docker-compose -f docker-compose.local.yml exec db sh -c echo "$MYSQL_ROOT_PASSWORD"

Add ability to require plugins in a project's pro-cli config

{
    "require": [
        "chriha/pro-cli-laravel",
        "https://github.com/chriha/pro-cli-share.git"
    ]
}

If the require property is defined, pro-cli should check if the according plugin is installed. If not, ask to install it. This operation should be remembered and not performed again. Further more, project require should install all plugins that are needed for the current project.

Wrong temp owner:group on Linux

Docker runs as root on Linux, that means everything created by Docker has the owner and group root. So, a Docker-created temp directory makes it impossible to write in it while inside of a container, as the user inside the container is the host-user (!= root). Let pro-cli check for the right owner:group of temp, fix it if possible or print a warning.

Docker Compose services should be changeable

Add ability to define the specific services in pro-cli.json:

{
    "services": {
        "web": "backend",
        "node": "npm"
    }
}

They still need to be updated in the docker-compose.local.yml though:

services:
  backend:
    ...
  npm:
    ...

Add command completion

  • Use zsh completions
  • Use command to update completions or check for changes and update automatically

Can't create project via composer in non-empty directory

The src/.env has to exist for Docker, when it's starting the container. On the other hand, projects can not directly be created via composer inside of a non-empty directory.

Workaround:

# create project in sub-directory
project composer create-project PROJECT YOUR_FOLDER
# and move everything in the upper dir
mv src/YOUR_FOLDER/{.,}* src && rm -rf src/YOUR_FOLDER

Deploy command

How about a project deploy command, which is like the project install and executes multiple commands.

Building jobs via Jenkins

pro-cli.json configuration:

{
    "builds": {
        "stage": {
            "path": "Test-Project/job/Stage",
            "params": {
                "branch": "develop"
            }
        },
        "production": {
            "confirm": true,
            "path": "Test-Project/job/Production",
            "params": {
                "branch": "master"
            }
        }
    }
}

Builds that have the confirm option, will show a prompt where the user has to confirm the build.

Jenkins configuration need to be set globally:

project config -g jenkins.url "http://JENKINS"
project config -g jenkins.user USER
project config -g jenkins.token TOKEN

To run the builds:

project build stage [--branch=develop --delay=0sec]
project status stage

Parameters used in the build command will overwrite existing parameters from pro-cli.json.

Add description to custom command scripts

Hey,

would be nice to implement the ability to add a description to custom command scripts in pro-cli.json

Like so:

"scripts": {
    "clean": {
      "command": "project composer clear-cache && project artisan optimize",
      "description": "Clean up the project"
    }
  }

If you type project you can display description there for custom commands.
Greez

"stat" failing on Mojave

Format %y is not a valid format anymore.

stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
jq: error: syntax error, unexpected $end (Unix shell quoting issues?) at <top-level>, line 1:
.updated_at =
jq: 1 compile error

Show hints from time to time

Show hints from time to time like:

You can list available plugins via project plugins show -a

You can disable hints via project config hints disabled

Install a new plugin via project plugins install PATH_TO_GIT_REPO

etc. Of course it should be possible to disable them (see hint above). Show hints every 30 minutes. Display a hint for 5 seconds, remove it again and go on with the command that was supposed to be executed. List a random hint via project hints -r, list all via project hints

Use repo to search for available pro-cli plugins

project plugin search magento

Would output something like:

- pro-cli-magento: Initialise new Magento projects within seconds and add Magento commands for easy usage
project plugin info pro-cli-magento

Would output something like:

Name: pro-cli-magento
Description: Initialise new Magento projects within seconds and add Magento commands for easy usage
Version: 1.x.x
Repository: https://github.com/chriha/pro-cli-magento

Install via:
project plugin install chriha/pro-cli-magento

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.