Skip to content
This repository has been archived by the owner on Jan 14, 2023. It is now read-only.

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
salrashid123 committed Aug 7, 2020
1 parent adc7cce commit 5c4102b
Show file tree
Hide file tree
Showing 26 changed files with 11,911 additions and 3 deletions.
28 changes: 28 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# How to Contribute

We'd love to accept your patches and contributions to this project. There are
just a few small guidelines you need to follow.

## Contributor License Agreement

Contributions to this project must be accompanied by a Contributor License
Agreement. You (or your employer) retain the copyright to your contribution;
this simply gives us permission to use and redistribute your contributions as
part of the project. Head over to <https://cla.developers.google.com/> to see
your current agreements on file or to sign a new one.

You generally only need to submit a CLA once, so if you've already submitted one
(even if it was for a different project), you probably don't need to do it
again.

## Code reviews

All submissions, including submissions by project members, require review. We
use GitHub pull requests for this purpose. Consult
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
information on using pull requests.

## Community Guidelines

This project follows
[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/).
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright [2020] [Google LLC]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
61 changes: 61 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
GOMAXPROCS = 4

PROJECT = "github.com/salrashid123/vault-plugin-secrets-gcpca"
NAME = $(shell go run version/cmd/main.go name)
VERSION = $(shell go run version/cmd/main.go version)
COMMIT = $(shell git rev-parse --short HEAD)

GOFMT_FILES?=$$(find . -name '*.go' | grep -v vendor)

LDFLAGS = \
-s \
-w \
-X ${PROJECT}/version.GitCommit=${COMMIT}

# XC_* are the platforms for cross-compiling. Customize these values to suit
# your needs.
XC_OS = darwin linux windows
XC_ARCH = 386 amd64
XC_EXCLUDE =

# default is the default make command
default: dev

fmt:
gofmt -w $(GOFMT_FILES)

# deps updates the project deps using golang/dep
deps:
@dep ensure -v -update
.PHONY: deps

# dev builds and installs the plugin for local development
dev:
@env \
CGO_ENABLED=0 \
go install \
-ldflags="${LDFLAGS}" \
./cmd/...
.PHONY: dev

# test runs the tests
test:
@go test -timeout=60s -parallel=10 ./...
.PHONY: test

# xc compiles all the binaries using the local go installation
xc:
@for OS in $(XC_OS); do \
for ARCH in $(XC_ARCH); do \
env \
CGO_ENABLED=0 \
GOOS=$${OS} \
GOARCH=$${ARCH} \
go build \
-a \
-o "pkg/$${OS}_$${ARCH}/${NAME}" \
-ldflags "${LDFLAGS}"
./cmd/... ; \
done \
done
.PHONY: xc
Loading

0 comments on commit 5c4102b

Please sign in to comment.