Skip to content

Commit

Permalink
Upgrade Go version to 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
jveillet committed Sep 7, 2023
1 parent 5b37dde commit d087dfe
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ By moving rewriting this tool with Go, I can generate a binary and let it run fo

## Prerequisites

* go 1.20
* go >= 1.20

Fonts are available in the `fonts/` directory (Arial by default).
Image templates are in the `templates/` directory.
Expand All @@ -20,16 +20,22 @@ Image templates are in the `templates/` directory.

Clone the repository.

```sh
```bash
git clone https://github.com/jveillet/demainilpleut-opengraph.git
```

Build the binary.

```sh
```bash
go build -o dist/opengraph
```

Building without cgo (disables calling C code (import "C"))

```bash
CGO_ENABLED=0 go build -o dist/opengraph
```

Or run via source.

```sh
Expand All @@ -40,22 +46,21 @@ go run main.go

Create a .env file at the root of the project, then add the two needed variables.

```sh
```bash
touch .env && OG_IMG_PATH=templates >> .env && OG_FONTS_PATH=fonts >> .env

```

## Usage

```sh
```bash
NAME:
Opengraph - demainilpleut's OpenGraph images generation
USAGE:
Opengraph [global options] command [command options] [arguments...]
VERSION:
1.0.1
1.0.2
COMMANDS:
generate, g Generate an OpenGraph image
Expand All @@ -68,7 +73,7 @@ GLOBAL OPTIONS:
### Generate
```sh
```bash
NAME:
Opengraph generate - Generate an OpenGraph image
Expand Down
10 changes: 6 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
module github.com/jveillet/demainilpleut-opengraph

go 1.20
go 1.21

require github.com/fogleman/gg v1.3.0
require (
github.com/fogleman/gg v1.3.0
github.com/joho/godotenv v1.5.1
github.com/urfave/cli/v2 v2.25.1
)

require (
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/joho/godotenv v1.5.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/urfave/cli/v2 v2.25.1 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
golang.org/x/image v0.7.0 // indirect
)
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func main() {
app := &cli.App{
Name: "Opengraph",
Usage: "demainilpleut's OpenGraph images generation",
Version: "1.0.1",
Version: "1.0.2",
Commands: []*cli.Command{
{
Name: "generate",
Expand Down

0 comments on commit d087dfe

Please sign in to comment.