Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-configured Gitpod to make it easier for contributors to contribute #1149

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
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
9 changes: 9 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
image:
file: .gitpod/.gitpod.Dockerfile
tasks:
- name: Prepare Environment
init: |
composer install
command: |
./.gitpod/scripts/login.sh
printf "\n\n All set! Be sure to test your changes by running: vendor/bin/phpunit\n\n"
4 changes: 4 additions & 0 deletions .gitpod/.gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM gitpod/workspace-full:latest

# Set PHP 7.4 - Gitpod defaults to 8.1 otherwise
RUN sudo update-alternatives --set php $(which php7.4)
8 changes: 8 additions & 0 deletions .gitpod/scripts/login.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

echo "When ready to make authenticated requests, use: platform auth:api-token-login"
echo "Or: export \PLATFORMSH_CLI_TOKEN=YOUR_TOKEN"

if [ -z "$PLATFORM_CLI_TOKEN" ]; then
echo "WARNING: \$PLATFORMSH_CLI_TOKEN was detected as an environment variable. If you share this workspace with others, they will have access to this token.";
fi;
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Development of the Platform.sh CLI happens in public in the
[GitHub repository](https://github.com/platformsh/platformsh-cli). Issues and
pull requests submitted via GitHub are very welcome.

## Developing via Gitpod

This project ships with a no-install, ready-to-develop environment using Gitpod. Start working on the 3.x branch [here](https://gitpod.io/#https://github.com/platformsh/platformsh-cli/tree/3.x).

Or, the branch of your choice using the format: https://gitpod.io/#https://github.com/platformsh/platformsh-cli/tree/{branch}

## Developing locally

If you clone this repository locally, you can build it with:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,5 @@ the command `platform clear-cache` (or `platform cc` for short).
## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for how to contribute to the CLI.

Or, launch a ready-to-develop environment via [Gitpod](https://gitpod.io/#https://github.com/platformsh/platformsh-cli/tree/3.x).
2 changes: 1 addition & 1 deletion src/Local/DependencyManager/Pip.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function install($path, array $dependencies, $global = false)
file_put_contents($path . '/requirements.txt', $this->formatRequirementsTxt($dependencies));
$command = $this->getCommandName() . ' install --requirement=requirements.txt';
if (!$global) {
$command .= ' --prefix=.';
$command .= ' --prefix=';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this change do?

}
$this->runCommand($command, $path);
}
Expand Down