From f2500f72a8aa6ad47d3e68b94efb1d1191ca1024 Mon Sep 17 00:00:00 2001 From: Bornholm <1067759+Bornholm@users.noreply.github.com> Date: Tue, 10 May 2022 23:53:20 +0200 Subject: [PATCH 1/4] chore: update README --- README.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bad4de0..b6f2157 100644 --- a/README.md +++ b/README.md @@ -46,9 +46,11 @@ echo '{}' | FORMIDABLE_BROWSER="firefox" frmd \ #### `stdin://` > TODO: Write doc + example + #### `http://` and `https://` > TODO: Write doc + example + #### `file://` > TODO: Write doc + example @@ -57,18 +59,24 @@ echo '{}' | FORMIDABLE_BROWSER="firefox" frmd \ #### JSON -- URL Query: `?format=json` -- File extension: `.json` +- **URL Query:** `?format=json` +- **File extension:** `.json` +- **As input:** yes +- **As output:** yes #### YAML -- URL Query: `?format=yaml` -- File extension: `.yaml` or `.yml` +- **URL Query:** `?format=yaml` +- **File extension:** `.yaml` or `.yml` +- **As input:** yes +- **As output:** yes #### HCL -- URL Query: `?format=hcl` -- File extension: `.hcl` +- **URL Query:** `?format=hcl` +- **File extension:** `.hcl` +- **As input:** yes +- **As output:** no ### Available outputs From bedd46977439295e624d6028ac53e13b8fd9ce41 Mon Sep 17 00:00:00 2001 From: Bornholm <1067759+Bornholm@users.noreply.github.com> Date: Tue, 10 May 2022 23:56:25 +0200 Subject: [PATCH 2/4] chore: update README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b6f2157..ce80b06 100644 --- a/README.md +++ b/README.md @@ -20,12 +20,13 @@ curl -sfL https://raw.githubusercontent.com/Bornholm/formidable/master/misc/scri It will download `frmd` to your current directory. -#### Script available environment variables +#### Install script environment variables |Name|Description|Default| |----|-----------|-------| |`FORMIDABLE_VERSION`|Formidable version to download|`latest`| |`FORMIDABLE_DESTDIR`|Formidable destination directory|`.`| + ### URLs Formidable uses URLs to define how to handle schemas/defaults/values. From fe3b807b98e929efea574f2356b6a6b523e405d9 Mon Sep 17 00:00:00 2001 From: William Petit Date: Thu, 12 May 2022 18:21:24 +0200 Subject: [PATCH 3/4] chore: add basic github workflows --- .github/workflows/go.yml | 27 ++++++++++++++++++++++++++ .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .github/workflows/go.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..0e65861 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,27 @@ +name: Go + +on: + push: + branches: + - "*" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.18 + + - name: Install make + run: sudo apt-get install -y make + + - name: Build + run: make build + + - name: Test + run: make test \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1f99465 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: goreleaser + +on: + push: + tags: + - '*' + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - + name: Fetch all tags + run: git fetch --force --tags + - + name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.18 + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From af5d7a1d144e7b75c42fa084c8e90088aa775bd6 Mon Sep 17 00:00:00 2001 From: William Petit Date: Thu, 12 May 2022 18:27:27 +0200 Subject: [PATCH 4/4] chore: generate assets before build --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7e24985..e086f9d 100644 --- a/Makefile +++ b/Makefile @@ -23,11 +23,11 @@ lint: ## Lint sources code build: build-frmd ## Build artefacts -build-frmd: ## Build executable +build-frmd: deps tailwind ## Build executable CGO_ENABLED=0 go build -v -o ./bin/frmd ./cmd/frmd .PHONY: tailwind -tailwind: +tailwind: deps npx tailwindcss -i ./internal/server/assets/src/main.css -o ./internal/server/assets/dist/main.css $(TAILWINDCSS_ARGS) internal/server/assets/dist/main.css: tailwind