Setting up project for repeatable builds

This commit is contained in:
Diego Fernando Carrión committed 2018-09-01 10:58:05 +02:00
1 parent 799d6b5455
commit b8c94abd1c
6 files changed
+135

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
vendor
bin
.gopath
Generated
+17
View File
@@ -0,0 +1,17 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
digest = "1:342378ac4dcb378a5448dd723f0784ae519383532f5e70ade24132c4c8693202"
name = "gopkg.in/yaml.v2"
packages = ["."]
pruneopts = "UT"
revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183"
version = "v2.2.1"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = ["gopkg.in/yaml.v2"]
solver-name = "gps-cdcl"
solver-version = 1
+34
View File
@@ -0,0 +1,34 @@
# Gopkg.toml example
#
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true
[[constraint]]
name = "gopkg.in/yaml.v2"
version = "2.2.1"
[prune]
go-tests = true
unused-packages = true
View File
File renamed without changes.
+35
View File
@@ -0,0 +1,35 @@
PACKAGE = git.xn--e-0fa.net/CRThaze/PARw
MAINSRCFILE = parw.go
ifndef GOPATHBUILD
GOPATH = $(CURDIR)/.gopath
BASE = $(GOPATH)/src/$(PACKAGE)
OUTPATH = bin/$(PACKAGE)
else
BASE = .
OUTPATH = $(GOPATH)/bin/$(PACKAGE)
endif
.DEFAULT_GOAL = all
$(BASE):
ifndef GOPATHBUILD
@mkdir -p $(dir $@)
@ln -sf $(CURDIR) $@
endif
.PHONY: deps
deps:
cd $(BASE) && dep ensure
.PHONY: all
all: | $(BASE) deps
cd $(BASE) && go build -o $(OUTPATH) $(MAINSRC)
.PHONY: clean
clean:
rm -rf .gopath
rm -rf bin
rm -rf vendor
+46
View File
@@ -0,0 +1,46 @@
# PARw: Production Access Report wrapper
## Usage
PARw is a transparent wrapper around your installed SSH command. It will keep a
log of your session and ask you some questions about the ticket or alert ID
associated with it, once you log off the specified host. These will then be used
to create a report for this session under a directory specified in
`$HOME/.parwrc.yaml`.
### Configuration
In order to keep all arguments identical to those of SSH, the location of the
configuration file is hardcoded to `$HOME/.parwrc.yaml`.
It supports the following setting(s):
| Key | Value Type | Description |
| ---------- | ---------- | ------------------------------------------ |
| reportsDir | String | The directory where reports will be saved. |
## Building
To build simply run:
```bash
make
```
The resulting binary will be found under `bin`.
Using `make`, this project can be built outside of a `GOPATH`, by faking the
`GOPATH` using a symlink under `.gopath`. However if you would like to use the
`GOPATH` in the traditional way, run:
```bash
GOPATHBUILD=x make
```
## License
X11 (See LICENSE.txt)
## Author
Diego Fernando Carrión (CRThaze)