mirror of https://github.com/statping/statping
snapcraft
parent
f7cc9a3699
commit
c65ad7b2a7
|
@ -13,10 +13,4 @@ RUN make dep
|
|||
RUN make dev-deps
|
||||
RUN make install
|
||||
|
||||
ENV IS_DOCKER=true
|
||||
ENV STATPING_DIR=/app
|
||||
WORKDIR /app
|
||||
VOLUME /app
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["make", "test-api"]
|
||||
CMD ["make", "test-api"]
|
14
Makefile
14
Makefile
|
@ -40,6 +40,8 @@ docker-build-all: docker-build-latest
|
|||
# push all docker tags built
|
||||
docker-publish-all: docker-push-latest
|
||||
|
||||
snapcraft: snapcraft-build snapcraft-release
|
||||
|
||||
# build Statping for local arch
|
||||
build: compile
|
||||
$(GOBUILD) $(BUILDVERSION) -o $(BINARY_NAME) -v ./cmd
|
||||
|
@ -96,6 +98,7 @@ coverage:
|
|||
|
||||
# generate documentation for Statping functions
|
||||
docs:
|
||||
godoc2md -ex github.com/hunterlong/statping >> dev/README.md
|
||||
godoc2md -ex github.com/hunterlong/statping/cmd >> dev/README.md
|
||||
godoc2md -ex github.com/hunterlong/statping/core > dev/README.md
|
||||
godoc2md -ex github.com/hunterlong/statping/handlers >> dev/README.md
|
||||
|
@ -299,9 +302,7 @@ travis-build:
|
|||
curl -s -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Travis-API-Version: 3" -H "Authorization: token $(TRAVIS_API)" -d $(TRAVIS_BUILD_CMD) https://api.travis-ci.com/repo/hunterlong%2Fstatping/requests
|
||||
curl -H "Content-Type: application/json" --data '{"docker_tag": "latest"}' -X POST $(DOCKER)
|
||||
|
||||
snapcraft: snapcraft-build snapcraft-release
|
||||
|
||||
snapcraft-build:
|
||||
snapcraft-build: build-all
|
||||
PWD=$(shell pwd)
|
||||
cp build/$(BINARY_NAME)-linux-x64.tar.gz build/$(BINARY_NAME)-linux.tar.gz
|
||||
snapcraft clean statping -s pull
|
||||
|
@ -320,11 +321,8 @@ snapcraft-build:
|
|||
snapcraft-release:
|
||||
snapcraft push *.snap --release edge
|
||||
|
||||
snap:
|
||||
snapcraft cleanbuild
|
||||
|
||||
sign-all:
|
||||
gpg --default-key CB1895149EEA4A2B8DBC9FB4C326E5C3B26BBA53 --detach-sign --armor statpinger
|
||||
gpg --default-key $SIGN_KEY --detach-sign --armor statpinger
|
||||
|
||||
valid-sign:
|
||||
gpg --verify statping.asc
|
||||
|
@ -334,4 +332,4 @@ xgo-install: clean
|
|||
go get github.com/karalabe/xgo
|
||||
docker pull karalabe/xgo-latest
|
||||
|
||||
.PHONY: all build build-all build-alpine test-all test test-api
|
||||
.PHONY: all build build-all build-alpine test-all test test-api docker
|
||||
|
|
2089
dev/COVERAGE.html
2089
dev/COVERAGE.html
File diff suppressed because one or more lines are too long
|
@ -2031,7 +2031,7 @@ CompileSASS will attempt to compile the SASS files into CSS
|
|||
|
||||
|
||||
|
||||
## <a name="CopyAllToPublic">func</a> [CopyAllToPublic](https://github.com/hunterlong/statping/tree/master/source/source.go?s=5781:5837#L167)
|
||||
## <a name="CopyAllToPublic">func</a> [CopyAllToPublic](https://github.com/hunterlong/statping/tree/master/source/source.go?s=5779:5835#L167)
|
||||
``` go
|
||||
func CopyAllToPublic(box *rice.Box, folder string) error
|
||||
```
|
||||
|
@ -2039,7 +2039,7 @@ CopyAllToPublic will copy all the files in a rice box into a local folder
|
|||
|
||||
|
||||
|
||||
## <a name="CopyToPublic">func</a> [CopyToPublic](https://github.com/hunterlong/statping/tree/master/source/source.go?s=6379:6438#L189)
|
||||
## <a name="CopyToPublic">func</a> [CopyToPublic](https://github.com/hunterlong/statping/tree/master/source/source.go?s=6377:6436#L189)
|
||||
``` go
|
||||
func CopyToPublic(box *rice.Box, folder, file string) error
|
||||
```
|
||||
|
@ -2047,7 +2047,7 @@ CopyToPublic will create a file from a rice Box to the '/assets' directory
|
|||
|
||||
|
||||
|
||||
## <a name="CreateAllAssets">func</a> [CreateAllAssets](https://github.com/hunterlong/statping/tree/master/source/source.go?s=4241:4282#L129)
|
||||
## <a name="CreateAllAssets">func</a> [CreateAllAssets](https://github.com/hunterlong/statping/tree/master/source/source.go?s=4239:4280#L129)
|
||||
``` go
|
||||
func CreateAllAssets(folder string) error
|
||||
```
|
||||
|
@ -2055,7 +2055,7 @@ CreateAllAssets will dump HTML, CSS, SCSS, and JS assets into the '/assets' dire
|
|||
|
||||
|
||||
|
||||
## <a name="DeleteAllAssets">func</a> [DeleteAllAssets](https://github.com/hunterlong/statping/tree/master/source/source.go?s=5436:5477#L156)
|
||||
## <a name="DeleteAllAssets">func</a> [DeleteAllAssets](https://github.com/hunterlong/statping/tree/master/source/source.go?s=5434:5475#L156)
|
||||
``` go
|
||||
func DeleteAllAssets(folder string) error
|
||||
```
|
||||
|
@ -2071,7 +2071,7 @@ HelpMarkdown will return the Markdown of help.md into HTML
|
|||
|
||||
|
||||
|
||||
## <a name="MakePublicFolder">func</a> [MakePublicFolder](https://github.com/hunterlong/statping/tree/master/source/source.go?s=6946:6988#L206)
|
||||
## <a name="MakePublicFolder">func</a> [MakePublicFolder](https://github.com/hunterlong/statping/tree/master/source/source.go?s=6944:6986#L206)
|
||||
``` go
|
||||
func MakePublicFolder(folder string) error
|
||||
```
|
||||
|
@ -2079,7 +2079,7 @@ MakePublicFolder will create a new folder
|
|||
|
||||
|
||||
|
||||
## <a name="OpenAsset">func</a> [OpenAsset](https://github.com/hunterlong/statping/tree/master/source/source.go?s=3931:3973#L119)
|
||||
## <a name="OpenAsset">func</a> [OpenAsset](https://github.com/hunterlong/statping/tree/master/source/source.go?s=3929:3971#L119)
|
||||
``` go
|
||||
func OpenAsset(folder, file string) string
|
||||
```
|
||||
|
|
|
@ -106,7 +106,7 @@ func UsingAssets(folder string) bool {
|
|||
|
||||
// SaveAsset will save an asset to the '/assets/' folder.
|
||||
func SaveAsset(data []byte, folder, file string) error {
|
||||
utils.Log(1, fmt.Sprintf("Saving %v/assets/%v into assets folder", folder, file))
|
||||
utils.Log(1, fmt.Sprintf("Saving %v/assets/%v", folder, file))
|
||||
err := ioutil.WriteFile(folder+"/assets/"+file, data, 0744)
|
||||
if err != nil {
|
||||
utils.Log(3, fmt.Sprintf("Failed to save %v/%v, %v", folder, file, err))
|
||||
|
@ -135,13 +135,13 @@ func CreateAllAssets(folder string) error {
|
|||
MakePublicFolder(folder + "/assets/font")
|
||||
MakePublicFolder(folder + "/assets/files")
|
||||
utils.Log(1, "Inserting scss, css, and javascript files into assets folder")
|
||||
CopyAllToPublic(FontBox, "font")
|
||||
CopyAllToPublic(ScssBox, "scss")
|
||||
CopyAllToPublic(FontBox, "font")
|
||||
CopyAllToPublic(CssBox, "css")
|
||||
CopyAllToPublic(JsBox, "js")
|
||||
CopyToPublic(FontBox, folder+"/assets/font", "all.css")
|
||||
CopyToPublic(TmplBox, folder+"/assets", "robots.txt")
|
||||
CopyToPublic(TmplBox, folder+"/assets", "statup.png")
|
||||
CopyToPublic(TmplBox, folder+"/assets", "banner.png")
|
||||
CopyToPublic(TmplBox, folder+"/assets", "favicon.ico")
|
||||
CopyToPublic(TmplBox, folder+"/assets/files", "swagger.json")
|
||||
CopyToPublic(TmplBox, folder+"/assets/files", "postman.json")
|
||||
|
@ -178,7 +178,7 @@ func CopyAllToPublic(box *rice.Box, folder string) error {
|
|||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
filePath := fmt.Sprintf("%v/%v", folder, path)
|
||||
filePath := fmt.Sprintf("%v%v", folder, path)
|
||||
SaveAsset(file, utils.Directory, filePath)
|
||||
return nil
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue