mirror of
https://github.com/Luzifer/cloudkeys-go.git
synced 2024-11-08 14:10:05 +00:00
Merge branch 'master' of github.com:Luzifer/cloudkeys-go into clipboardapi
Conflicts: assets/script.js bindata.go coffee/script.coffee
This commit is contained in:
commit
26bc1a35e1
7 changed files with 35 additions and 66 deletions
14
Dockerfile
14
Dockerfile
|
@ -1,10 +1,14 @@
|
|||
FROM scratch
|
||||
FROM alpine
|
||||
|
||||
VOLUME /data
|
||||
EXPOSE 3000
|
||||
ENTRYPOINT ["/cloudkeys-go"]
|
||||
ENV GOPATH /go
|
||||
ENTRYPOINT ["/go/bin/cloudkeys-go"]
|
||||
CMD ["--storage=local:////data", "--password-salt=changeme", "--username-salt=changeme"]
|
||||
|
||||
ADD ./ca-certificates.pem /etc/ssl/ca-bundle.pem
|
||||
ADD ./cloudkeys-go /cloudkeys-go
|
||||
ADD ./templates /templates
|
||||
ADD . /go/src/github.com/Luzifer/cloudkeys-go
|
||||
WORKDIR /go/src/github.com/Luzifer/cloudkeys-go
|
||||
RUN apk --update add go git ca-certificates \
|
||||
&& go get github.com/tools/godep \
|
||||
&& /go/bin/godep go install -ldflags "-X main.version=$(git describe --tags)" \
|
||||
&& apk --purge del git go
|
||||
|
|
11
History.md
11
History.md
|
@ -1,4 +1,15 @@
|
|||
|
||||
1.2.4 / 2015-10-28
|
||||
==================
|
||||
|
||||
* Improved Dockerfile and Makefile
|
||||
|
||||
1.2.3 / 2015-08-25
|
||||
==================
|
||||
|
||||
* Replaced Google PKI certificates
|
||||
* fixed escaping for passwords with double quotes
|
||||
|
||||
1.2.2 / 2015-08-01
|
||||
==================
|
||||
|
||||
|
|
18
Makefile
18
Makefile
|
@ -2,13 +2,12 @@ VERSION = $(shell git describe --tags)
|
|||
|
||||
default: build
|
||||
|
||||
build: bundle_assets
|
||||
go build .
|
||||
build: $(GOPATH)/bin/godep bindata.go
|
||||
$(GOPATH)/bin/godep go build -ldflags "-X main.version=$(VERSION)" .
|
||||
|
||||
pre-commit: bundle_assets
|
||||
pre-commit: bindata.go
|
||||
|
||||
container: ca-certificates.pem bundle_assets
|
||||
docker run -v $(CURDIR):/src -e LDFLAGS='-X main.version $(VERSION)' centurylink/golang-builder:latest
|
||||
container: bindata.go
|
||||
docker build .
|
||||
|
||||
gen_css:
|
||||
|
@ -17,9 +16,8 @@ gen_css:
|
|||
gen_js:
|
||||
coffee --compile -o assets coffee/*.coffee
|
||||
|
||||
bundle_assets: gen_css gen_js
|
||||
go-bindata assets templates
|
||||
bindata.go: gen_css gen_js
|
||||
go generate
|
||||
|
||||
ca-certificates.pem:
|
||||
curl -s https://pki.google.com/roots.pem | grep -v "^#" | grep -v "^$$" > $@
|
||||
shasum $@
|
||||
$(GOPATH)/bin/godep:
|
||||
go get github.com/tools/godep
|
||||
|
|
|
@ -211,7 +211,7 @@
|
|||
field = $("<li><label>Username:</label><input type=\"text\" class=\"username\" value=\"" + item.username + "\"><br></li>");
|
||||
ul.append(field);
|
||||
this.getClipboardCode(item.username).insertBefore(field.find("br"));
|
||||
field = $("<li class=\"passwordtoggle\"><label>Password:</label><input type=\"text\" class=\"password\" value=\"" + password + "\" data-toggle=\"" + item.password + "\"><em> (toggle visibility)</em></span><br></li>");
|
||||
field = $("<li class=\"passwordtoggle\"><label>Password:</label><input type=\"text\" class=\"password\" value=\"" + password + "\" data-toggle=\"" + (item.password.replace(/"/g, '"')) + "\"><em> (toggle visibility)</em></span><br></li>");
|
||||
ul.append(field);
|
||||
this.getClipboardCode(item.password).insertBefore(field.find("br"));
|
||||
field = $("<li><label>URL:</label><input type=\"text\" class=\"url\" value=\"" + item.url + "\"><br></li>");
|
||||
|
|
52
bindata.go
52
bindata.go
File diff suppressed because one or more lines are too long
|
@ -158,7 +158,7 @@ class CloudKeys
|
|||
ul.append(field)
|
||||
@getClipboardCode(item.username).insertBefore(field.find("br"))
|
||||
|
||||
field = $("<li class=\"passwordtoggle\"><label>Password:</label><input type=\"text\" class=\"password\" value=\"#{ password }\" data-toggle=\"#{ item.password }\"><em> (toggle visibility)</em></span><br></li>")
|
||||
field = $("<li class=\"passwordtoggle\"><label>Password:</label><input type=\"text\" class=\"password\" value=\"#{ password }\" data-toggle=\"#{ item.password.replace(/"/g, '"') }\"><em> (toggle visibility)</em></span><br></li>")
|
||||
ul.append(field)
|
||||
@getClipboardCode(item.password).insertBefore(field.find("br"))
|
||||
|
||||
|
|
2
main.go
2
main.go
|
@ -1,5 +1,7 @@
|
|||
package main // import "github.com/mthie/cloudkeys-go"
|
||||
|
||||
//go:generate go-bindata assets templates
|
||||
|
||||
import (
|
||||
"crypto/sha1"
|
||||
"fmt"
|
||||
|
|
Loading…
Reference in a new issue