-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Ryex/update-for-latest
Update for latest Dungeondraft
- Loading branch information
Showing
42 changed files
with
4,270 additions
and
1,214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: build | ||
on: push | ||
permissions: | ||
packages: write | ||
contents: write | ||
jobs: | ||
build: | ||
name: "Build Dungeondraft-GoPackager (${{ matrix.target.os }}, ${{ matrix.go-version }})" | ||
runs-on: ${{ matrix.target.host || 'ubuntu-latest' }} | ||
env: | ||
GO111MODULE: on | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
go-version: ["1.23.x"] | ||
target: | ||
- os: linux | ||
- os: windows | ||
ext: .exe | ||
host: windows-latest | ||
- os: darwin | ||
host: macos-latest | ||
steps: | ||
- name: Setup Go environment | ||
id: setup-go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache build artifacts | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
~/.cache/fyne-cross | ||
key: ${{ runner.os }}-build-cache-${{ hashFiles('**/go.sum') }} | ||
- name: Install Build Deps (Linux) | ||
if: ${{ runner.os == 'linux' }} | ||
run: sudo apt-get install golang gcc libgl1-mesa-dev xorg-dev | ||
- name: Install Fyne | ||
run: go install fyne.io/fyne/v2/cmd/fyne@latest | ||
- name: install go deps | ||
run: go mod download | ||
- name: Build gui | ||
run: | | ||
fyne package -src ./cmd/dungeondraft-packager -appID io.github.ryex.dungondraft-gopackager | ||
- name: Build cli | ||
run: | | ||
go build -ldflags "-s -w" ./cmd/dungeondraft-packager-cli | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
body_path: CHANGELOG.md | ||
draft: true | ||
files: | | ||
dungeondraft-packager* | ||
README.md | ||
LICENSE.md | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1 @@ | ||
*.png | ||
*.webp | ||
*.jpg | ||
*.json | ||
*.dungeondraft_* | ||
*.log | ||
vendor/ | ||
gui/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). | ||
|
||
<!-- insertion marker --> | ||
## [2.0.0+pre-1](https://github.com/Ryex/Dungeondraft-GoPackager/releases/tag/2.0.0+pre-1) - 2024-09-24 | ||
|
||
<small>[Compare with v1.1.0](https://github.com/Ryex/Dungeondraft-GoPackager/compare/v1.1.0...2.0.0+pre-1)</small> | ||
|
||
### Features | ||
|
||
- finialize packaging gui ([27210cb](https://github.com/Ryex/Dungeondraft-GoPackager/commit/27210cb576d49edeaf3793e71bca537ab3f73069) by Rachel Powers). | ||
- initial gui ([2f60012](https://github.com/Ryex/Dungeondraft-GoPackager/commit/2f600127f1c6918a5ef4f43554cb14d2d72d1369) by Rachel Powers). | ||
- start of gui ([75fdbd0](https://github.com/Ryex/Dungeondraft-GoPackager/commit/75fdbd07b88885548c9a56974a522c071bb6aa38) by Rachel Powers). | ||
- track image format ([8699a4a](https://github.com/Ryex/Dungeondraft-GoPackager/commit/8699a4a5321e790be87a0d713f2f9572043a873d) by Rachel Powers). | ||
- impl generate thumbnails ([9d62b6f](https://github.com/Ryex/Dungeondraft-GoPackager/commit/9d62b6f631016660fed7587b20d219ba7ede02b5) by Rachel Powers). | ||
|
||
### Code Refactoring | ||
|
||
- merge packer and unpacker structs ([0e9fdfa](https://github.com/Ryex/Dungeondraft-GoPackager/commit/0e9fdfadca20dcdcb33a83d44de50b72d76dc5e9) by Rachel Powers). | ||
- better FileInfo init ([dc92fff](https://github.com/Ryex/Dungeondraft-GoPackager/commit/dc92fffeed05a5092b24710d90b66d363b731217) by Rachel Powers). | ||
- rename binary ([745b024](https://github.com/Ryex/Dungeondraft-GoPackager/commit/745b024d592c011e6f706a4e22deeeef88fa84dc) by Rachel Powers). | ||
- merge command binaries, use kong for cli parsing, seperate generate command, list cmd ([fc9b8ca](https://github.com/Ryex/Dungeondraft-GoPackager/commit/fc9b8ca7ac15eaed1f291d8ff9fb0b48ca689901) by Rachel Powers). | ||
- update for useing with latest dungeondraft (GoDot 3.4.2) ([872512f](https://github.com/Ryex/Dungeondraft-GoPackager/commit/872512faec06d52be95b93ecef39c0a46cfe391e) by Rachel Powers). | ||
|
||
|
||
|
||
## [v1.1.0](https://github.com/Ryex/Dungeondraft-GoPackager/releases/tag/v1.1.0) - 2020-07-16 | ||
|
||
<small>[Compare with v1.0.2](https://github.com/Ryex/Dungeondraft-GoPackager/compare/v1.0.2...v1.1.0)</small> | ||
|
||
## [v1.0.2](https://github.com/Ryex/Dungeondraft-GoPackager/releases/tag/v1.0.2) - 2020-07-16 | ||
|
||
<small>[Compare with v1.0.1](https://github.com/Ryex/Dungeondraft-GoPackager/compare/v1.0.1...v1.0.2)</small> | ||
|
||
## [v1.0.1](https://github.com/Ryex/Dungeondraft-GoPackager/releases/tag/v1.0.1) - 2020-07-07 | ||
|
||
<small>[Compare with v1.0.0](https://github.com/Ryex/Dungeondraft-GoPackager/compare/v1.0.0...v1.0.1)</small> | ||
|
||
## [v1.0.0](https://github.com/Ryex/Dungeondraft-GoPackager/releases/tag/v1.0.0) - 2020-06-21 | ||
|
||
<small>[Compare with v0.1.0](https://github.com/Ryex/Dungeondraft-GoPackager/compare/v0.1.0...v1.0.0)</small> | ||
|
||
## [v0.1.0](https://github.com/Ryex/Dungeondraft-GoPackager/releases/tag/v0.1.0) - 2020-06-20 | ||
|
||
<small>[Compare with first commit](https://github.com/Ryex/Dungeondraft-GoPackager/compare/b36d63374d2e7f5ca3f5553c37d12561dcc3956b...v0.1.0)</small> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
Website = "https://ryex.github.io/Dungeondraft-GoPackager/" | ||
|
||
[Details] | ||
Icon = "Icon.png" | ||
Name = "Dungeondraft GoPackager" | ||
ID = "io.github.ryex.dungondraft-gopackager" | ||
Version = "2.0.0" | ||
Build = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
43 changes: 43 additions & 0 deletions
43
cmd/dungeondraft-packager-cli/dungeondraft-packager-cli.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package main | ||
|
||
import ( | ||
"os" | ||
|
||
"github.com/alecthomas/kong" | ||
"github.com/ryex/dungeondraft-gopackager/internal/cmd" | ||
|
||
log "github.com/sirupsen/logrus" | ||
) | ||
|
||
var CLI struct { | ||
LogLevel log.Level `short:"v" type:"counter" help:"log level, 0 = Error, 1 = Warn (-v), 2 = Info (-vv), 3 = Debug (-vvv), 4 = Trace (-vvvv)"` | ||
|
||
Pack cmd.PackCmd `cmd:"" help:"Packs the contents of a directory to a .dungeondraft_pack file, there must be a valid pack.json in the directory"` | ||
Unpack cmd.UnpackCmd `cmd:"" help:"Extracts the contesnts of a .dungeondraft_pack file"` | ||
Generate cmd.GenCmd `cmd:"" aliases:"gen" help:"Generate pack data and thumbtails"` | ||
List cmd.ListCmd `cmd:"" aliases:"ls" help:"list resources in a .dungeondraft_pack file"` | ||
} | ||
|
||
func main() { | ||
ctx := kong.Parse(&CLI, | ||
kong.Name("dungeondraft-packager-cli"), | ||
kong.Description("Pack, Unpack, Edit, and Prepare resources for .dungeondraft_pack files"), | ||
kong.UsageOnError(), | ||
kong.ConfigureHelp( | ||
kong.HelpOptions{ | ||
Compact: true, | ||
Summary: true, | ||
}), | ||
// vars | ||
) | ||
|
||
level := CLI.LogLevel + 2 | ||
log.SetLevel(level) | ||
log.SetOutput(os.Stderr) | ||
log.SetFormatter(&log.TextFormatter{ | ||
ForceColors: true, | ||
}) | ||
|
||
err := ctx.Run(&cmd.Context{}) | ||
ctx.FatalIfErrorf(err) | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package main | ||
|
||
import ( | ||
"os" | ||
|
||
"github.com/alecthomas/kong" | ||
"github.com/ryex/dungeondraft-gopackager/internal/gui" | ||
|
||
log "github.com/sirupsen/logrus" | ||
) | ||
|
||
var CLI struct { | ||
LogLevel log.Level `short:"v" type:"counter" help:"log level, 0 = Error, 1 = Warn (-v), 2 = Info (-vv), 3 = Debug (-vvv), 4 = Trace (-vvvv)"` | ||
} | ||
|
||
func main() { | ||
kong.Parse(&CLI, | ||
kong.Name("dungeondraft-packager"), | ||
kong.Description("Pack, Unpack, Edit, and Prepare resources for .dungeondraft_pack files"), | ||
kong.UsageOnError(), | ||
kong.ConfigureHelp( | ||
kong.HelpOptions{ | ||
Compact: true, | ||
Summary: true, | ||
}), | ||
// vars | ||
) | ||
|
||
level := CLI.LogLevel + 2 | ||
log.SetLevel(level) | ||
log.SetOutput(os.Stderr) | ||
log.SetFormatter(&log.TextFormatter{ | ||
ForceColors: true, | ||
}) | ||
|
||
app := gui.NewApp() | ||
app.Main() | ||
} |
Oops, something went wrong.