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:
brew install goreleaser
brew install dep- This is the Go dependency management tool.
Recommended way is to use scoop command line installer
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')
scoop install go
scoop bucket add goreleaser https://github.com/goreleaser/scoop-bucket.git
scoop install goreleaser
Install Go dependency management tool
scoop install dep
For other OSes, please see Goreleaser.
- Check out XP CLI from GitHub
dep ensurein the project folder. - This will download all dependencies for the project.
goreleaser --rm-dist --snapshotin the project folder to build a snapshot of latest code. A binary installation, ready for use will be put in the dist folder.
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:
- 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
- repo.enonic.com - This repo use the Artifactory general
ciuser. The API key for the
ciuser must be put in a local environment variable called
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