1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-11-23 02:40:11 +00:00

Updated Build (markdown)

Harvey Tindall 2021-04-01 14:42:11 +01:00
parent 9913c9abd4
commit 43cc609bdc

@ -29,7 +29,10 @@ The main dependencies of the program will be automatically downloaded on compila
### Makefile ### Makefile
A Makefile is provided, which requires the `make` command. Simply clone the repository and run `make all` to grab all necessary dependencies for go/python/node, compile everything and place the executable and app data inside `build/`. You can optionally compress the executable by running `make compress` after. A Makefile is provided, which requires the `make` command. Simply clone the repository and run `make all` to grab all necessary dependencies for go/python/node, compile everything and place the executable and app data inside `build/`. You can optionally compress the executable by running `make compress` after.
* By default, `make all` will embed the program's assets inside the binary. If you want jfa-go to use external assets, use `make all-external` instead, and they will be placed next to the executable in `data/`. * You can add the following flags with `make all FLAGNAME=VALUE`:
* `DEBUG=on`: doesn't strip binaries and includes typescript sourcemaps.
* `INTERNAL=off`: Defaults to on, this disables embedding so assets are stored in the `data/` folder next to the binary. Useful for customizing after compilation.
* `UPDATER=on/off/docker`: Enables/disables the updater, which pings [build.hrfee.pw](https://builds.hrfee.pw) every 30 mins for new updates. New updates are shown with a download link to the user. When `INTERNAL=on`, updates are automatically downloaded, and installed upon request.
* If you get an error from npm regarding esbuild, this is because a precompiled binary for your system's architecture isn't available on npm. run `make all GOESBUILD=on` instead to have it compiled instead. * If you get an error from npm regarding esbuild, this is because a precompiled binary for your system's architecture isn't available on npm. run `make all GOESBUILD=on` instead to have it compiled instead.
@ -37,6 +40,6 @@ A Makefile is provided, which requires the `make` command. Simply clone the repo
### Goreleaser ### Goreleaser
[goreleaser](https://github.com/goreleaser/goreleaser) is used to publish the packages seen in the release section. [goreleaser](https://github.com/goreleaser/goreleaser) is used to publish the packages seen in the release section.
* To generate executables for multiple platforms, run `goreleaser build --snapshot --rm-dist`. They will be stored in `dist/`. The `data/` directory must be manually copied into the same directory as the executable for it to run. * To generate executables for multiple platforms, run `./scripts/version.sh goreleaser build --snapshot --rm-dist`. They will be stored in `dist/`. The `data/` directory must be manually copied into the same directory as the executable for it to run.
* To generate package archives that include `data`, run `goreleaser --snapshot --skip-publish --rm-dist`. * To generate package archives that include `data`, run `./scripts/version.sh goreleaser --snapshot --skip-publish --rm-dist`.