开发后构建
Requirements [¶]{.ul}
Git
Go >= 1.16
Checkout the Source Code
Fork the project and clone the repository locally.
Miniflux uses [Go
Modules]{.ul} to manage
dependencies.
Compilation
Build the application for the actual platform:
make miniflux
To define a specific version number:
make miniflux VERSION=2.0.29
Cross compilation:
Build all binaries for all supported platforms
make build
Build Linux binary for amd64 architecture
make linux-amd64
ARM 64 bits (arm64v8)
make linux-arm64
ARM 32 bits variant 7 (arm32v7)
make linux-armv7
ARM 32 bits variant 6 (arm32v6)
make linux-armv6
ARM 32 bits variant 5 (arm32v5)
make linux-armv5
Mac OS (amd64)
make darwin-amd64
Mac OS (arm64 / Apple Silicon)
make darwin-arm64
FreeBSD (amd64)
make freebsd-amd64
OpenBSD (amd64)
make openbsd-amd64
Windows (amd64)
make windows-amd64
Remove Precompiled Binaries
make clean
Run the Software Locally
make run
This command runs the software in debug mode.
Linter
make lint
Unit Tests
make test
Integration Tests
Integration tests are testing API endpoints with a real database.
You need to have Postgresql installed locally preconfigured with the
user “postgres” and the password “postgres”.
To run integration tests, execute the following command:
make integration-test ; make clean-integration-test
If the test suite fail, you will see the logs of Miniflux.
Build Docker Image
Miniflux supports different architectures for Docker
images: amd64, arm32v6, arm32v7 and arm64v8.
Here an example to build only the amd64 image:
make docker-image
Build all images and override the image name:
make docker-images DOCKER_IMAGE=your-namespace/miniflux
Override the build version:
make docker-images DOCKER_IMAGE=your-namespace/miniflux VERSION=42
Note that you need to enable Docker experimental features to build multi
platform images. Miniflux
uses [buildx]{.ul}.
Build RPM package
You can build your own RPM package by using this command:
make rpm
Note that Docker is required to generate the RPM package. All build
operations are running inside a container.
Build Debian package
You can build your own Debian package by using this command:
make debian
Use the following command to build packages for all supported
architectures (amd64, arm64, and armhf):
make debian-packages
Note that Docker is required to generate the Debian packages. All build
operations are running inside a container.
本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!