Skip to content

Commit

Permalink
Improve release process & other fixes (#68)
Browse files Browse the repository at this point in the history
* add script for generating release binaries

* update installation instructions

* increase plugin version to 1.1.2 in metadata

* remove vendor dir in favor of go modules

* update .gitignore

* update script to compile for arm64

* update README
  • Loading branch information
markdboyd authored Jul 13, 2023
1 parent 092a812 commit 97c2fe9
Show file tree
Hide file tree
Showing 2,626 changed files with 24 additions and 630,275 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
cf-db-connect*
cf-service-connect*
.DS_Store
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## Welcome!
# CONTRIBUTING

## Welcome

We're so glad you're thinking about contributing to an 18F open source project! If you're unsure about anything, just ask -- or submit the issue or pull request anyway. The worst that can happen is you'll be politely asked to change something. We love all friendly contributions.

Expand Down Expand Up @@ -31,6 +33,6 @@ This will (re)install then run the plugin, all in one.
### Releasing

1. Update `Version` in [`main.go`](main.go).
1. Follow the [compilation instructions](https://github.com/cloudfoundry-incubator/cli-plugin-repo#cross-compile-to-the-3-different-operating-systems).
1. Run `bin/create-release-binaries.sh` to [create cross-compiled binaries](https://github.com/cloudfoundry-incubator/cli-plugin-repo#cross-compile-to-the-3-different-operating-systems).
1. Commit, tag, and push via Git.
1. Upload the binaries to [the new Release](https://github.com/18F/cf-service-connect/releases).
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ Currently supports (most) service brokers for the following:
```sh
cf install-plugin <binary_url>
# will be of the format
# https://github.com/18F/cf-service-connect/releases/download/<version>/cf-service-connect.<os>
# For OSX use cf-service-connect-darwin-xxx
# https://github.com/cloud-gov/cf-service-connect/releases/download/<version>/cf-service-connect_<os>-<arch>
# For non-M1 Macs, use `cf-service-connect_darwin_amd64`
# For M1 Macs, use `cf-service-connect_darwin_arm64`
```

3. Install the CLI corresponding to your service type (see above).
Expand All @@ -37,7 +38,7 @@ Currently supports (most) service brokers for the following:
* `app_name` is the name of the app in your space you want to tunnel through.
* `service_instance_name` is the service instance you wish to connect to.

```
```shell
$ cf target --organization <org> --space <space>
$ cf connect-to-service <app_name> <service_instance_name>
Finding the service instance details...
Expand All @@ -51,3 +52,7 @@ If you get an error such as "connection refused", "error opening SSH connection"
### Manual client connection

If you're using a non-default client (such as a GUI), run with the `-no-client` option to set up your client connection on your own.
## Contributing
See [CONTRIBUTING.md](./CONTRIBUTING.md)
10 changes: 10 additions & 0 deletions bin/create-release-binaries.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

PLUGIN_NAME="cf-service-connect"

GOOS=darwin GOARCH=amd64 go build -o ${PLUGIN_NAME}_darwin_amd64
GOOS=darwin GOARCH=arm64 go build -o ${PLUGIN_NAME}_darwin_arm64
GOOS=linux GOARCH=amd64 go build -o ${PLUGIN_NAME}_linux_amd64
GOOS=linux GOARCH=386 go build -o ${PLUGIN_NAME}_linux_386
GOOS=windows GOARCH=amd64 go build -o ${PLUGIN_NAME}_windows_amd64
GOOS=windows GOARCH=386 go build -o ${PLUGIN_NAME}_windows_386
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (c *ServiceConnectPlugin) GetMetadata() plugin.PluginMetadata {
Version: plugin.VersionType{
Major: 1,
Minor: 1,
Build: 0,
Build: 2,
},
MinCliVersion: plugin.VersionType{
Major: 6,
Expand Down
15 changes: 0 additions & 15 deletions vendor/code.cloudfoundry.org/cli/.codeclimate.yml

This file was deleted.

4 changes: 0 additions & 4 deletions vendor/code.cloudfoundry.org/cli/.gitallowed

This file was deleted.

1 change: 0 additions & 1 deletion vendor/code.cloudfoundry.org/cli/.gitattributes

This file was deleted.

114 changes: 0 additions & 114 deletions vendor/code.cloudfoundry.org/cli/.github/CONTRIBUTING.md

This file was deleted.

25 changes: 0 additions & 25 deletions vendor/code.cloudfoundry.org/cli/.github/ISSUE_TEMPLATE.md

This file was deleted.

63 changes: 0 additions & 63 deletions vendor/code.cloudfoundry.org/cli/.gitignore

This file was deleted.

14 changes: 0 additions & 14 deletions vendor/code.cloudfoundry.org/cli/.travis.yml

This file was deleted.

Loading

0 comments on commit 97c2fe9

Please sign in to comment.