diff --git a/.drone.yml b/.drone.yml index 924164f..b0340e8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,3 +7,16 @@ steps: image: registry.gitlab.com/pipeline-components/luacheck:latest commands: - luacheck --std +love -g -u -t . +- name: build + image: alpine + commands: + - ./tools/boon/boon love download 11.3 + - ./tools/boon/boon build . +- name: release + image: plugins/gitea-release + settings: + api_key: + from_secret: gitea_api + base_url: https://git.biggetje.net + files: release/* + prerelease: true \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2bd78de..8a3bb14 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ vision.sublime-project vision.sublime-workspace +build/ +release/ diff --git a/Boon.toml b/Boon.toml new file mode 100644 index 0000000..a677aab --- /dev/null +++ b/Boon.toml @@ -0,0 +1,41 @@ +[project] +authors = "The Impossible Astronaut" +description = "A small game about a set of spaceships" +email = "buildartifacts@sexybiggetje.nl" +package_name = "vision" +title = "Vision" +url = "https://git.biggetje.net/martijn/vision/" +uti = "com.theimpossibleastronaut.vision" +version = "v0.1" + +[build] +output_directory = "release" +ignore_list = [ + # Git + "^.git.*", + + # Binary files + ".zip$", + ".tar.gz$", + ".love$", + ".exe$", + ".psd$", + + # Boon-specific files and directories + "Boon.toml", + "release", + "tools", + ".drone.yml", + ".luacheckrc", + "vision.sublime-.*" +] + +# List of targets to build for +# Possible values: "love", "windows", "macos", "all" +targets = ["all"] + +# If this is set to true, then the default ignore list will not be +# merged with the project specific ignore list. This allows the +# ignore list to be completely overwritten. +exclude_default_ignore_list = false + diff --git a/conf.lua b/conf.lua index 854513a..4101529 100644 --- a/conf.lua +++ b/conf.lua @@ -1,7 +1,7 @@ function love.conf(t) t.title = "Vision" t.author = "The Impossible Astronaut" - t.version = "11.4" + t.version = "11.3" t.identity = "Vision" t.gammacorrect = true diff --git a/tools/boon/LICENSE b/tools/boon/LICENSE new file mode 100644 index 0000000..52db19e --- /dev/null +++ b/tools/boon/LICENSE @@ -0,0 +1,7 @@ +Copyright 2019 Cameron McHenry + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/boon/README.md b/tools/boon/README.md new file mode 100644 index 0000000..f0dc49b --- /dev/null +++ b/tools/boon/README.md @@ -0,0 +1,103 @@ +# boon + +boon is a build tool for LÖVE. It makes it easy to package your game for multiple platforms, similar to [love-release](https://github.com/MisterDA/love-release). It is a single executable with no other dependecies. It can be used across multiple projects and makes automated building a breeze. + +![Rust](https://github.com/camchenry/boon/workflows/Rust/badge.svg) + +Licensed under the MIT License. + +# Features +* Package your game for multiple platforms. Supported platforms: + * Native (.love) + * Windows (.exe) + * macOS (.app) + * Linux (coming soon) +* Package your game for multiple versions of LÖVE. Supported versions: + * 11.x + * 0.10.2 +* No external dependencies + +# Getting started + +## Installation + +### Download prebuilt binaries (recommended) + +boon has prebuilt binaries on the GitHub Releases page. Download the zip file, then extract the executable onto your PATH. + +If you're a **Windows** user, download the `boon-windows-amd64` file. + +If you're a **macOS** user, download the `boon-macos-amd64` file. + +If you're a **Linux** user, download the `boon-linux-amd64` file. + +## Usage + +In general, if you need help figuring out how to use a command you can pass the `--help` option to see possible arguments, options, and subcommands. To get started and see the top-level commands and options, run `boon --help`. + +### Initialization +To start using boon with your project, it is recommended to first initialize it. This will create a `Boon.toml` file that will let you configure the settings for your project. + +```bash +$ boon init +``` + +If you don't initialize boon, you can still build your project normally, but the default configuration will be used to build it instead. You can initialize it later, or create a `Boon.toml` file yourself. + +### Downloading LÖVE + +In order to build your project, you first need to download the versionof LÖVE that you are using for it. + +```bash +# Will download LÖVE 11.3 for building +$ boon love download 11.3 +``` + +### Building your project + +Finally, to build your project just run `boon build` followed by where you want to run it. Usually, you just want to run it on the current directory, `.`. + +```bash +$ boon build . +``` + +Without a target specified, this will build a `.love` file and put it in the `release` directory. This is shorthand for `boon build