Skip to content
No description, website, or topics provided.
Go Makefile
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
internal/app Merge pull request #164 from enonic/issue-141 Aug 21, 2019
.gitignore
.goreleaser.yml Installing CLI on Arch Linux with Snap #141 Aug 22, 2019
Gopkg.lock Sandbox is considered to be running after restarting the machine #129 May 22, 2019
Gopkg.toml Sandbox is considered to be running after restarting the machine #129 May 22, 2019
LICENSE.txt
Makefile Publish Enonic CLI in Linux/Ubuntu repository #128 May 17, 2019
README.md Publish Enonic CLI in Linux/Ubuntu repository #128 May 17, 2019
build.gradle added initial documentation for project Dec 13, 2018

README.md

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 token. 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/eonic/next/enonic_1.0.0-next_Windows_64-bit.zip" -T enonic_1.0.0-next_Windows_64-bit.zip
You can’t perform that action at this time.