* Use standard Linux directories for application data (https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard) * Use standard system directories * Cleanup all Polaris files during uninstall * Expose get_pid_directory to rest of the crate * Add separate targets for install binary and data files, clean up makefile * Use environment variables for directory locations during install process * On Linux, read locations from environment variables at compile time * Split static_directory in two (web and swagger directories) * Follow recommendations from the Make manual * Avoid redundant directories * Added workflow to validate installer setup * Added CLI options to locate log file, pid file and cache directory * Fixed an issue where build command did not support the xdg/system switch * Renamed log option to log-level * Fixed an issue where xdg install would do a system build * Use re-usable action to make linux release * Avoid nested actions (see https://github.com/actions/runner/issues/646) * Updated installation instructions * Replaced deprecated use of set-env
1.8 KiB
1.8 KiB
Contributing
Compiling and Running Polaris
Compiling and running Polaris is very easy as it only depends on the Rust toolchain.
- Install Rust, you need the
nightly
version of the toolchain - Clone the polaris depot with this command:
git clone --recursive https://github.com/agersant/polaris.git
- You can now run compile and run polaris from the newly created directory with the command:
cargo run
Polaris supports a few command line arguments which are useful during development:
-w some/path/to/web/dir
lets you point to the directory to be served as the web interface. You can find a suitable directory in your Polaris install (under/web
), or from the latest polaris-web release.-s some/path/to/swagger/dir
lets you point to the directory to be served as the swagger API documentation. You'll probably want to point this to the/docs/swagger
directory of the polaris repository.-d some/path/to/a/file.db
lets you manually choose where Polaris stores its configuration and music index (you can reuse the same database accross multiple runs).-c some/config.toml
lets you use a configuration file to add content to the database. This can be useful if you frequently delete the database and would like to automate the first time flow. The configuration format is not documented but can be inferred by looking at theConfig
struct inconfig.rs
.-f
(on Linux) makes Polaris not fork into a separate process.
Putting it all together, a typical command to compile and run the program would be: cargo run -- -w web -s docs/swagger -d test-output/my.db
While Polaris is running, access the web UI at http://localhost:5050.
Running Unit Tests
That's the easy part, simply run cargo test
!