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
|
VOLUME /data
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
ENTRYPOINT ["/cloudkeys-go"]
|
ENV GOPATH /go
|
||||||
|
ENTRYPOINT ["/go/bin/cloudkeys-go"]
|
||||||
CMD ["--storage=local:////data", "--password-salt=changeme", "--username-salt=changeme"]
|
CMD ["--storage=local:////data", "--password-salt=changeme", "--username-salt=changeme"]
|
||||||
|
|
||||||
ADD ./ca-certificates.pem /etc/ssl/ca-bundle.pem
|
ADD . /go/src/github.com/Luzifer/cloudkeys-go
|
||||||
ADD ./cloudkeys-go /cloudkeys-go
|
WORKDIR /go/src/github.com/Luzifer/cloudkeys-go
|
||||||
ADD ./templates /templates
|
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
|
1.2.2 / 2015-08-01
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
|
18
Makefile
18
Makefile
|
@ -2,13 +2,12 @@ VERSION = $(shell git describe --tags)
|
||||||
|
|
||||||
default: build
|
default: build
|
||||||
|
|
||||||
build: bundle_assets
|
build: $(GOPATH)/bin/godep bindata.go
|
||||||
go build .
|
$(GOPATH)/bin/godep go build -ldflags "-X main.version=$(VERSION)" .
|
||||||
|
|
||||||
pre-commit: bundle_assets
|
pre-commit: bindata.go
|
||||||
|
|
||||||
container: ca-certificates.pem bundle_assets
|
container: bindata.go
|
||||||
docker run -v $(CURDIR):/src -e LDFLAGS='-X main.version $(VERSION)' centurylink/golang-builder:latest
|
|
||||||
docker build .
|
docker build .
|
||||||
|
|
||||||
gen_css:
|
gen_css:
|
||||||
|
@ -17,9 +16,8 @@ gen_css:
|
||||||
gen_js:
|
gen_js:
|
||||||
coffee --compile -o assets coffee/*.coffee
|
coffee --compile -o assets coffee/*.coffee
|
||||||
|
|
||||||
bundle_assets: gen_css gen_js
|
bindata.go: gen_css gen_js
|
||||||
go-bindata assets templates
|
go generate
|
||||||
|
|
||||||
ca-certificates.pem:
|
$(GOPATH)/bin/godep:
|
||||||
curl -s https://pki.google.com/roots.pem | grep -v "^#" | grep -v "^$$" > $@
|
go get github.com/tools/godep
|
||||||
shasum $@
|
|
||||||
|
|
|
@ -211,7 +211,7 @@
|
||||||
field = $("<li><label>Username:</label><input type=\"text\" class=\"username\" value=\"" + item.username + "\"><br></li>");
|
field = $("<li><label>Username:</label><input type=\"text\" class=\"username\" value=\"" + item.username + "\"><br></li>");
|
||||||
ul.append(field);
|
ul.append(field);
|
||||||
this.getClipboardCode(item.username).insertBefore(field.find("br"));
|
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);
|
ul.append(field);
|
||||||
this.getClipboardCode(item.password).insertBefore(field.find("br"));
|
this.getClipboardCode(item.password).insertBefore(field.find("br"));
|
||||||
field = $("<li><label>URL:</label><input type=\"text\" class=\"url\" value=\"" + item.url + "\"><br></li>");
|
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)
|
ul.append(field)
|
||||||
@getClipboardCode(item.username).insertBefore(field.find("br"))
|
@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)
|
ul.append(field)
|
||||||
@getClipboardCode(item.password).insertBefore(field.find("br"))
|
@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"
|
package main // import "github.com/mthie/cloudkeys-go"
|
||||||
|
|
||||||
|
//go:generate go-bindata assets templates
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/sha1"
|
"crypto/sha1"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
Loading…
Reference in a new issue