JSPM

  • Created
  • Published
  • Downloads 205
  • Score
    100M100P100Q82558F
  • License GPLv3

Command-line interface for Enonic XP

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@enonic/cli-test) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Enonic XP CLI

    Enonic XP CLI is a command-line tool built for management of installations and projects of Enonic XP.

    In order to build and develop the CLI, you need to have the Go environment available.

    Installing Go build and release environment:

    Mac OS
    1. brew install goreleaser
    2. brew install dep - This is the Go dependency management tool.
    Windows

    Recommended way is to use scoop command line installer

    1. Install scoop if needed

      Make sure Powershell 3 (or later) and .NET Framework 4.5 (or later) are installed. Then run:

      iex (new-object net.webclient).downloadstring('https://get.scoop.sh')

    2. Install go

      scoop install go

    3. Install goreleaser

      scoop bucket add goreleaser https://github.com/goreleaser/scoop-bucket.git

      scoop install goreleaser

    4. Install Go dependency management tool

      scoop install dep

    For other OSes, please see Goreleaser.

    Building project

    1. Check out XP CLI from GitHub
    2. Run dep ensure in the project folder. - This will download all dependencies for the project.
    3. Run goreleaser --rm-dist --snapshot in the project folder to build a snapshot of latest code. A binary installation, ready for use will be put in the dist folder.

    Publishing

    goreleaser requires the current commit to be tagged in GitHub in order to be published, so if you want to publish the latest code, commit it and tag the commit. If you want to publish an earlier version, check out the version. Then a build (goreleaser --rm-dist) will publish xp-cli to GitHub and our own Artifactory repo, as long as it is set up correctly:

    1. GitHub - To publish to GitHub, you must have publishing rights on the xp-cli project, and a personal Access Code to identify yourself. This can be set up on GitHub by going to your personal Settings / Developer Settings / Personal Access tokens. Create a token with all rights to repo and put it in ~/.config/goreleaser/github_token
    2. repo.enonic.com - This repo use the Artifactory general ci user. The API key for the ci user must be put in a local environment variable called ARTIFACTORY_REPO_SECRET.

    If you build a snapshot with goreleaser --rm-dist --snapshot, it may be uploaded to our repo by executing this command for each created distro:

    • curl -u ci:$ARTIFACTORY_REPO_SECRET -X PUT "http://repo.enonic.com/public/com/enonic/cli/enonic/next/enonic_1.0.0-next_Windows_64-bit.zip" -T enonic_1.0.0-next_Windows_64-bit.zip