Merge branch 'release/0.0.2'

This commit is contained in:
wpetit 2022-05-12 18:34:12 +02:00
commit 2b5eb5d286
4 changed files with 81 additions and 9 deletions

27
.github/workflows/go.yml vendored Normal file
View File

@ -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

36
.github/workflows/release.yml vendored Normal file
View File

@ -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 }}

View File

@ -23,11 +23,11 @@ lint: ## Lint sources code
build: build-frmd ## Build artefacts 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 CGO_ENABLED=0 go build -v -o ./bin/frmd ./cmd/frmd
.PHONY: tailwind .PHONY: tailwind
tailwind: tailwind: deps
npx tailwindcss -i ./internal/server/assets/src/main.css -o ./internal/server/assets/dist/main.css $(TAILWINDCSS_ARGS) 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 internal/server/assets/dist/main.css: tailwind

View File

@ -20,12 +20,13 @@ curl -sfL https://raw.githubusercontent.com/Bornholm/formidable/master/misc/scri
It will download `frmd` to your current directory. It will download `frmd` to your current directory.
#### Script available environment variables #### Install script environment variables
|Name|Description|Default| |Name|Description|Default|
|----|-----------|-------| |----|-----------|-------|
|`FORMIDABLE_VERSION`|Formidable version to download|`latest`| |`FORMIDABLE_VERSION`|Formidable version to download|`latest`|
|`FORMIDABLE_DESTDIR`|Formidable destination directory|`.`| |`FORMIDABLE_DESTDIR`|Formidable destination directory|`.`|
### URLs ### URLs
Formidable uses URLs to define how to handle schemas/defaults/values. Formidable uses URLs to define how to handle schemas/defaults/values.
@ -46,9 +47,11 @@ echo '{}' | FORMIDABLE_BROWSER="firefox" frmd \
#### `stdin://` #### `stdin://`
> TODO: Write doc + example > TODO: Write doc + example
#### `http://` and `https://` #### `http://` and `https://`
> TODO: Write doc + example > TODO: Write doc + example
#### `file://` #### `file://`
> TODO: Write doc + example > TODO: Write doc + example
@ -57,18 +60,24 @@ echo '{}' | FORMIDABLE_BROWSER="firefox" frmd \
#### JSON #### JSON
- URL Query: `?format=json` - **URL Query:** `?format=json`
- File extension: `.json` - **File extension:** `.json`
- **As input:** yes
- **As output:** yes
#### YAML #### YAML
- URL Query: `?format=yaml` - **URL Query:** `?format=yaml`
- File extension: `.yaml` or `.yml` - **File extension:** `.yaml` or `.yml`
- **As input:** yes
- **As output:** yes
#### HCL #### HCL
- URL Query: `?format=hcl` - **URL Query:** `?format=hcl`
- File extension: `.hcl` - **File extension:** `.hcl`
- **As input:** yes
- **As output:** no
### Available outputs ### Available outputs