Compare commits

6 Commits

Author SHA1 Message Date
68756014be Force CI to repackage the wasm_exec.js support file
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-21 20:22:17 +01:00
79f8adaf1a I meant main
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-20 21:44:09 +01:00
4413fab9ad Limit CI to master 2022-01-20 21:43:40 +01:00
e89acf585f Add readme
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-20 21:40:09 +01:00
2a0bfd0e10 Fix download links
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-20 21:37:34 +01:00
ac4b86fd03 Update CI
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-20 21:35:37 +01:00
5 changed files with 77 additions and 20 deletions

View File

@@ -1,34 +1,41 @@
---
kind: pipeline
type: kubernetes
name: build-linux-amd64
name: build-clis
trigger:
branch:
- main
steps:
- name: build
image: golang:1.17
environment:
GOOS: linux
GOARCH: amd64
commands:
- "go build -o covergen_$GOOS-$GOARCH ./cmd/covergen"
---
kind: pipeline
type: kubernetes
name: build-darwin-amd64
- make build-cross-clis
- name: upload
image: plugins/s3
settings:
bucket: covergen
source: dist/*
target: /dist/
strip_prefix: dist/
path_style: true
endpoint: https://s3.blacknova.io
access_key:
from_secret: minio_access_key_id
secret_key:
from_secret: minio_secret_access_key
steps:
- name: build
image: golang:1.17
environment:
GOOS: darwin
GOARCH: amd64
commands:
- "go build -o covergen_$GOOS-$GOARCH ./cmd/covergen"
---
kind: pipeline
type: kubernetes
name: build-wasm
trigger:
branch:
- main
steps:
- name: build
image: golang:1.17
@@ -37,3 +44,20 @@ steps:
GOARCH: wasm
commands:
- make wasm
# Grab the wasm shim from the docker image, otherwise there is a mismatch
- "cp /usr/local/go/misc/wasm/wasm_exec.js assets/wasm_exec.js"
- name: upload
image: plugins/s3
settings:
bucket: covergen
source: assets/**/*
target: /
strip_prefix: assets/
path_style: true
endpoint: https://s3.blacknova.io
access_key:
from_secret: minio_access_key_id
secret_key:
from_secret: minio_secret_access_key

3
.gitignore vendored
View File

@@ -1,4 +1,5 @@
covergen
!covergen/
*.pdf
assets/*.wasm
assets/*.wasm
dist/

View File

@@ -1,3 +1,9 @@
.PHONY: build-cross-clis
build-cross-clis:
rm -rf ./dist && mkdir ./dist
GOOS=linux GOARCH=amd64 go build -o dist/covergen.linux-amd64 ./cmd/covergen
GOOS=darwin GOARCH=amd64 go build -o dist/covergen.darwin-amd64 ./cmd/covergen
.PHONY: wasm
wasm:
GOOS=js GOARCH=wasm go build -o assets/covergen.wasm ./cmd/wasm/main.go
.PHONY: wasm

20
README.md Normal file
View File

@@ -0,0 +1,20 @@
# Covergen
Just generates some magic PDF invoice covers using straight up dark magic.
## Just be lazy
Go see it in action and download it from [https://s3.blacknova.io/covergen/index.html](https://s3.blacknova.io/covergen/index.html)
## Just build it
```
$ go build -o covergen ./cmd/covergen
```
## It has wasm!
```
$ make wasm
```

View File

@@ -89,5 +89,11 @@
<iframe id="front"></iframe>
<iframe id="back"></iframe>
</div>
<div class="download-links">
Download the CLI:
<a href="./dist/covergen.linux-amd64">Linux amd64</a>
<a href="./dist/covergen.darwin-amd64">Darwin amd64</a>
</div>
</body>
</html>
</html>