Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .gon.hcl

This file was deleted.

2 changes: 1 addition & 1 deletion .goreleaser.vendor.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ nfpms:
- homepage: https://docs.upsun.com/anchors/fixed/cli/
package_name: ${VENDOR_BINARY}-cli
description: ${VENDOR_NAME} CLI
maintainer: Antonis Kalipetis <antonis.kalipetis@platform.sh>
maintainer: Antonis Kalipetis <antonis.kalipetis@upsun.com>
license: MIT
vendor: Platform.sh
ids:
Expand Down
12 changes: 6 additions & 6 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ brews:

commit_author:
name: Antonis Kalipetis
email: antonis.kalipetis@platform.sh
email: antonis.kalipetis@upsun.com

homepage: https://docs.upsun.com/anchors/fixed/cli/
description: Platform.sh CLI
Expand Down Expand Up @@ -245,7 +245,7 @@ brews:

commit_author:
name: Antonis Kalipetis
email: antonis.kalipetis@platform.sh
email: antonis.kalipetis@upsun.com

homepage: https://docs.upsun.com/anchors/cli/
description: Upsun CLI
Expand Down Expand Up @@ -274,7 +274,7 @@ scoops:
directory: Scoops
commit_author:
name: Antonis Kalipetis
email: antonis.kalipetis@platform.sh
email: antonis.kalipetis@upsun.com

homepage: https://docs.upsun.com/anchors/fixed/cli/
description: Platform.sh CLI
Expand All @@ -295,7 +295,7 @@ scoops:
directory: Scoops
commit_author:
name: Antonis Kalipetis
email: antonis.kalipetis@platform.sh
email: antonis.kalipetis@upsun.com

homepage: https://docs.upsun.com/anchors/cli/
description: Upsun CLI
Expand All @@ -310,7 +310,7 @@ nfpms:
homepage: https://docs.upsun.com/anchors/fixed/cli/
package_name: platformsh-cli
description: Platform.sh CLI
maintainer: Antonis Kalipetis <antonis.kalipetis@platform.sh>
maintainer: Antonis Kalipetis <antonis.kalipetis@upsun.com>
license: MIT
vendor: Platform.sh
ids:
Expand All @@ -329,7 +329,7 @@ nfpms:
homepage: https://docs.upsun.com/anchors/cli/
package_name: upsun-cli
description: Upsun CLI
maintainer: Antonis Kalipetis <antonis.kalipetis@platform.sh>
maintainer: Antonis Kalipetis <antonis.kalipetis@upsun.com>
license: MIT
vendor: Platform.sh
ids:
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PHP_VERSION = 8.2.29
LEGACY_CLI_VERSION = 4.26.0

GORELEASER_ID ?= platform
GORELEASER_ID ?= upsun

ifeq ($(GOOS), darwin)
GORELEASER_ID=$(GORELEASER_ID)-macos
Expand Down Expand Up @@ -71,10 +71,10 @@ goreleaser:
command -v goreleaser >/dev/null || go install github.com/goreleaser/goreleaser/v2@$(GORELEASER_VERSION)

.PHONY: single
single: goreleaser internal/legacy/archives/platform.phar php ## Build a single target release for Platform.sh or Upsun
single: goreleaser internal/legacy/archives/platform.phar php ## Build a single target release
PHP_VERSION=$(PHP_VERSION) LEGACY_CLI_VERSION=$(LEGACY_CLI_VERSION) goreleaser build --single-target --id=$(GORELEASER_ID) --snapshot --clean

.PHONY: snapshot ## Build a snapshot release for Platform.sh and Upsun
.PHONY: snapshot ## Build a snapshot release
snapshot: goreleaser internal/legacy/archives/platform.phar php
PHP_VERSION=$(PHP_VERSION) LEGACY_CLI_VERSION=$(LEGACY_CLI_VERSION) goreleaser build --snapshot --clean

Expand All @@ -83,7 +83,7 @@ clean-phar: ## Clean up the legacy CLI phar
rm -f internal/legacy/archives/platform.phar

.PHONY: release
release: goreleaser clean-phar internal/legacy/archives/platform.phar php ## Release the Platform.sh and Upsun CLIs
release: goreleaser clean-phar internal/legacy/archives/platform.phar php ## Create and publish a release
PHP_VERSION=$(PHP_VERSION) LEGACY_CLI_VERSION=$(LEGACY_CLI_VERSION) goreleaser release --clean
VERSION=$(VERSION) bash cloudsmith.sh

Expand Down
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Platform.sh CLI
# Upsun CLI

The **Platform.sh CLI** is the official command-line interface for [Platform.sh](https://platform.sh). Use this tool to interact with your [Platform.sh](https://platform.sh) projects, and to build them locally for development purposes.
The **Upsun CLI** is the official command-line interface for [Upsun](https://upsun.com) (formerly Platform.sh).

This repository hosts the source code and releases of the new CLI.
This repository hosts the source code and releases of the CLI.

> This product includes PHP software, freely available from [the PHP website](https://www.php.net/software)

Expand Down Expand Up @@ -183,25 +183,23 @@ yum upgrade -y platformsh-cli

## Under the hood

The New Platform.sh CLI is built with backwards compatibility in mind. This is why we've embedded PHP, so that all Legacy PHP CLI commands can be executed in the exact same way, making sure that nothing breaks when you switch to it.

## Building binaries, snapshots and releases

Build a single binary

```console
# Build a single binary for Platform.sh
make single
# Build a single binary for Upsun
make single GORELEASER_ID=upsun
```

Build a snapshot

```console
# Build and snapshot for Platform.sh and Upsun
make snapshot
# Build a snapshot for a vendor
```

Build a snapshot for a vendor

```console
# Download the config file at internal/config/embedded-config.yaml
make vendor-snapshot VENDOR_NAME='Upsun staging' VENDOR_BINARY='upsunstg'
```
Expand All @@ -212,7 +210,7 @@ Create a release
# First, create a new tag, if not already on a Git tag
git tag -f -m 'Release v5.0.0' '5.0.0'

# Create a release for Platform.sh and Upsun
# Create a release
# Expose a GITHUB_TOKEN to use for the release
make release

Expand Down
16 changes: 8 additions & 8 deletions installer.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Platform.sh CLI installer
# Upsun CLI installer

set -euo pipefail

Expand All @@ -11,10 +11,10 @@ set -euo pipefail

: "${URL:=https://github.com/platformsh/cli/releases/download}"

# Force Platform.sh CLI installation in this directory instead of system directory
# Force Upsun CLI installation in this directory instead of system directory
: "${INSTALL_DIR:=}"

# Platform.sh CLI version to install
# Upsun CLI version to install
: "${VERSION:=}"

# macOS specifics
Expand All @@ -24,8 +24,8 @@ set -euo pipefail
# GitHub token check
: "${GITHUB_TOKEN:=}"

# Platform.sh CLI vendor to install
: "${VENDOR:=platformsh}"
# Upsun CLI vendor to install
: "${VENDOR:=upsun}"

# CI specifics
: "${CI:=}"
Expand All @@ -34,7 +34,7 @@ set -euo pipefail

# global variables
binary="platform"
vendor_name="Platform.sh"
vendor_name="Upsun (formerly Platform.sh)"
cloudsmith_repository="cli"
cmd_shasum=""
cmd_sudo=""
Expand All @@ -45,8 +45,8 @@ kernel=""
machine=""
version=""
package="platformsh-cli"
docs_url="https://docs.platform.sh"
support_url="https://platform.sh/contact"
docs_url="https://docs.upsun.com"
support_url="https://upsun.com/contact"

if [ "$VENDOR" == "upsun" ]; then
BREW_FORMULA="platformsh/tap/upsun-cli"
Expand Down
51 changes: 27 additions & 24 deletions internal/config/platformsh-cli.yaml
Original file line number Diff line number Diff line change
@@ -1,60 +1,51 @@
# Platform.sh CLI configuration
# Upsun CLI (Platform.sh compatibility) configuration
#
# Based on the legacy CLI config in https://github.com/platformsh/legacy-cli/blob/main/config.yaml
# Platform.sh is now Upsun.
#
# See ../internal/config/schema.go for the required keys
# These are settings for the 'platform' command, which is available for backwards compatibility.
wrapper:
homebrew_tap: platformsh/tap/platformsh-cli
github_repo: platformsh/cli

application:
name: 'Platform.sh CLI'
name: 'Upsun CLI (Platform.sh compatibility)'
slug: 'platformsh-cli'
executable: 'platform'
env_prefix: 'PLATFORMSH_CLI_'
user_config_dir: '.platformsh'

package_name: 'platformsh/cli'
installer_url: 'https://platform.sh/cli/installer'
manifest_url: 'https://platform.sh/cli/manifest.json'
github_repo: 'platformsh/legacy-cli'

mark_unwrapped_legacy: true

disabled_commands:
- self:install
- self:update

local:
# A legacy project config file from versions < 3.
project_config_legacy: 'platform-project.yaml'

service:
name: 'Platform.sh'
name: 'Upsun (formerly Platform.sh)'
env_prefix: 'PLATFORM_'

project_config_dir: '.platform'
app_config_file: '.platform.app.yaml'
project_config_flavor: 'platform'

console_url: 'https://console.platform.sh'
console_url: 'https://console.upsun.com'

docs_url: 'https://docs.platform.sh'
docs_search_url: 'https://docs.platform.sh/search.html?q={{ terms }}'
docs_url: 'https://docs.upsun.com'
docs_search_url: 'https://docs.upsun.com/search.html?q={{ terms }}'

register_url: 'https://auth.api.platform.sh/register'
reset_password_url: 'https://auth.api.platform.sh/reset-password'
register_url: 'https://auth.upsun.com/register'
reset_password_url: 'https://auth.upsun.com/reset-password'

pricing_url: 'https://platform.sh/pricing'
pricing_url: 'https://upsun.com/pricing'

activity_type_list_url: 'https://docs.upsun.com/anchors/fixed/integrations/activity-scripts/type/'

runtime_operations_help_url: 'https://docs.upsun.com/anchors/fixed/app/runtime-operations/'

api:
base_url: 'https://api.platform.sh'
base_url: 'https://api.upsun.com'

auth_url: 'https://auth.api.platform.sh'
auth_url: 'https://auth.upsun.com'
oauth2_client_id: 'platform-cli'

organization_types: [flexible, fixed]
Expand All @@ -65,17 +56,29 @@ api:
metrics: true
teams: true

vendor_filter: 'platformsh'
vendor_filter: 'upsun'

ssh:
domain_wildcards: ['*.platform.sh']

detection:
git_remote_name: 'platform'
git_domain: 'platform.sh' # matches git.eu-5.platform.sh, etc.
site_domains: ['platform.sh', 'platformsh.site', 'tst.site']
site_domains: ['platform.sh', 'platformsh.site', 'tst.site', 'upsunapp.com', 'upsun.app']
cluster_header: 'X-Platform-Cluster'

browser_login:
body: |
<img
src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJ1dWlkLTk2NDZkYjJkLTc3NjItNDc3Yy05MWMzLWE3OGZhNmY3ZTYzMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgNDAzLjM3IDI0OS4zIj48cGF0aCBkPSJtMTYzLjg4LDE0My40NmMtMi42LDAtNC44Mi0uNTctNi42Ny0xLjctMS44NS0xLjEzLTMuMjYtMi42NC00LjIyLTQuNTQtLjk2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NDMuMjdoMjEuNjNjLjA1LTExLjk2LDkuNzQtMjEuNjMsMjEuNjctMjEuNjNaIi8+PHBhdGggZD0ibTk3LjEyLDE0NWM4LjM0LTMuMDEsMTQuMjktMTAuOTgsMTQuMjktMjAuMzRoLTQzLjI1YzAsOS4zNiw1Ljk2LDE3LjM1LDE0LjI5LDIwLjM0di4zN2gtMzAuNjRjNy4zMywxMy40MywyMS42LDIyLjU0LDM4LDIyLjU0czMwLjY0LTkuMTEsMzgtMjIuNTRoLTMwLjY5di0uMzdaIi8+PC9nPjwvc3ZnPg=="
alt=""
height="100"
class="icon">

<h1>{{title}}</h1>

{{content}}

migrate:
prompt: true
docs_url: https://docs.upsun.com/anchors/fixed/cli/
Expand Down
32 changes: 16 additions & 16 deletions internal/config/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ type Config struct {

Application struct {
// Fields required for both the PHP and Go applications.
Name string `validate:"required"` // e.g. "Platform.sh CLI"
EnvPrefix string `validate:"required" yaml:"env_prefix"` // e.g. "PLATFORMSH_CLI_"
Executable string `validate:"required"` // e.g. "platform"
Slug string `validate:"required,ascii"` // e.g. "platformsh-cli"
UserConfigDir string `validate:"required" yaml:"user_config_dir"` // e.g. ".platformsh"
Name string `validate:"required"` // e.g. "Upsun CLI"
EnvPrefix string `validate:"required" yaml:"env_prefix"` // e.g. "UPSUN_CLI_"
Executable string `validate:"required"` // e.g. "upsun"
Slug string `validate:"required,ascii"` // e.g. "upsun-cli"
UserConfigDir string `validate:"required" yaml:"user_config_dir"` // e.g. ".upsun"
UserStateFile string `validate:"omitempty" yaml:"user_state_file,omitempty"` // defaults to "state.json"
WritableUserDir string `validate:"omitempty" yaml:"writable_user_dir,omitempty"` // defaults to UserConfigDir
TempSubDir string `validate:"omitempty" yaml:"tmp_sub_dir,omitempty"` // defaults to Slug+"-tmp"
Expand All @@ -42,32 +42,32 @@ type Config struct {

// Fields only needed by the PHP (legacy) CLI, at least for now.
API struct {
BaseURL string `validate:"required,url" yaml:"base_url"` // e.g. "https://api.platform.sh"
AuthURL string `validate:"omitempty,url" yaml:"auth_url,omitempty"` // e.g. "https://auth.api.platform.sh"
BaseURL string `validate:"required,url" yaml:"base_url"` // e.g. "https://api.upsun.com"
AuthURL string `validate:"omitempty,url" yaml:"auth_url,omitempty"` // e.g. "https://auth.upsun.com"

UserAgent string `validate:"omitempty" yaml:"user_agent,omitempty"` // a template - see UserAgent method
SessionID string `validate:"omitempty,ascii" yaml:"session_id,omitempty"` // the ID for the authentication session - defaults to "default"

OAuth2ClientID string `validate:"omitempty" yaml:"oauth2_client_id,omitempty"` // e.g. "upsun-cli"
OAuth2AuthorizeURL string `validate:"required_without=AuthURL,omitempty,url" yaml:"oauth2_auth_url,omitempty"` // e.g. "https://auth.api.platform.sh/oauth2/authorize"
OAuth2RevokeURL string `validate:"required_without=AuthURL,omitempty,url" yaml:"oauth2_revoke_url,omitempty"` // e.g. "https://auth.api.platform.sh/oauth2/revoke"
OAuth2TokenURL string `validate:"required_without=AuthURL,omitempty,url" yaml:"oauth2_token_url,omitempty"` // e.g. "https://auth.api.platform.sh/oauth2/token"
CertifierURL string `validate:"required_without=AuthURL,omitempty,url" yaml:"certifier_url,omitempty"` // e.g. "https://ssh.api.platform.sh"
OAuth2AuthorizeURL string `validate:"required_without=AuthURL,omitempty,url" yaml:"oauth2_auth_url,omitempty"` // e.g. "https://auth.upsun.com/oauth2/authorize"
OAuth2RevokeURL string `validate:"required_without=AuthURL,omitempty,url" yaml:"oauth2_revoke_url,omitempty"` // e.g. "https://auth.upsun.com/oauth2/revoke"
OAuth2TokenURL string `validate:"required_without=AuthURL,omitempty,url" yaml:"oauth2_token_url,omitempty"` // e.g. "https://auth.upsun.com/oauth2/token"
CertifierURL string `validate:"required_without=AuthURL,omitempty,url" yaml:"certifier_url,omitempty"` // No longer used

AIServiceURL string `validate:"omitempty,url" yaml:"ai_url,omitempty"` // The AI service URL, e.g. "https://ai.upsun.com".
EnableOrganizations bool `validate:"omitempty" yaml:"organizations,omitempty"` // Whether the "organizations" feature is enabled.
} `validate:"required"`
Detection struct {
GitRemoteName string `validate:"required" yaml:"git_remote_name"` // e.g. "platform"
SiteDomains []string `validate:"required" yaml:"site_domains"` // e.g. ["platformsh.site", "tst.site"]
GitRemoteName string `validate:"required" yaml:"git_remote_name"` // e.g. "upsun"
SiteDomains []string `validate:"required" yaml:"site_domains"` // e.g. ["upsunapp.com", "upsun.app"]
} `validate:"required"`
Service struct {
Name string `validate:"required"` // e.g. "Platform.sh"
Name string `validate:"required"` // e.g. "Upsun"
EnvPrefix string `validate:"required" yaml:"env_prefix"` // e.g. "PLATFORM_"
ProjectConfigDir string `validate:"required" yaml:"project_config_dir"` // e.g. ".platform"
ProjectConfigFlavor string `validate:"omitempty" yaml:"project_config_flavor,omitempty"` // default: "platform"
ConsoleURL string `validate:"omitempty,url" yaml:"console_url,omitempty"` // e.g. "https://console.platform.sh"
DocsURL string `validate:"omitempty,url" yaml:"docs_url,omitempty"` // e.g. "https://docs.platform.sh"
ConsoleURL string `validate:"omitempty,url" yaml:"console_url,omitempty"` // e.g. "https://console.upsun.com"
DocsURL string `validate:"omitempty,url" yaml:"docs_url,omitempty"` // e.g. "https://docs.upsun.com"
} `validate:"required"`
SSH struct {
DomainWildcards []string `validate:"required" yaml:"domain_wildcards"` // e.g. ["*.platform.sh"]
Expand Down
4 changes: 2 additions & 2 deletions internal/config/upsun-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ ssh:

detection:
git_remote_name: "upsun"
git_domain: "upsun.com"
site_domains: ["platformsh.site", "tst.site", "upsunapp.com"]
git_domain: "platform.sh" # matches git.eu-5.platform.sh, etc.
site_domains: ["platformsh.site", "tst.site", "upsunapp.com", "upsun.app"]
cluster_header: 'X-Platform-Cluster'

browser_login:
Expand Down