Skip to content

Latest commit

 

History

History
170 lines (119 loc) · 5.6 KB

CONTRIBUTING.md

File metadata and controls

170 lines (119 loc) · 5.6 KB

Contributing

By contributing to this project you agree to license your contribution under the terms of the GNU GPLv3.

[[TOC]]

Issues

Open an issue for anything you would like to see in JaMuz, but please check other issues first.

Internationalization

Using weblate.org

Warning! if you consider manual edition (ie: without weblate):

  • The bundle**.properties files are ISO 8859-1 encoded.

    • This means: NO UTF-8 nor anything else!

    • Using a different encoding may certainly result in weird characters in the GUI

  • NetBeans respect the convention, but other editors may use instead UTF-8 for instance

Pull Requests

Pull requests are welcome. Please submit to the master branch.

Get Started

  • Clone repository to {Repo}

  • Get a TheMovieDb API key for free

  • Get a LastFm API key for free

  • Get an AcoustId API key for free

  • Create/update keys.properties file in {Repo}/res

    TheMovieDb={yourKey}
    LastFm={yourKey}
    AcoustId={yourKey}
    
  • Create JaMuz.db by running:

    • on Windows: database\create_db.bat.
      • (If sqlite3 is not installed, script will install it using Chocolatey, but you need to "Run as administrator")
    • on Linux: database/create_db.sh
  • Create folder {Repo}/target-data and copy there your files from:

    • database/JaMuz.db
    • dist-data/JaMuz.properties

! WARNING ! Each time you will do a mvn clean, files in {Repo}/target will be replaced with those!

  • Open project using NetBeans
  • Build project
  • You can now run and enjoy (hopefully)

Stat sources

In addition to the currently supported stat sources (Guayadeque, Kodi, Media Monkey, Mixxx, MyTunes) you can add one simply by extending the jamuz.StatSourceAbstract class and adding entry to database.

Release process

  1. If database/JaMuz_creation.sql has changed:

    • Create a file data/system/sql/$version.sql.
      • $version is the new database version.
    • Update Jamuz.java, set new version in getDb().updateSchema($version) call.
    • Update database/JaMuz_insertion_minimal.sql to set an entry with $version.
    • Check that JaMuz properly handles update.
      • Export prod schema and compare with JaMuz_creation.sql.
  2. Check changes to release content:

    • Create a new local release candidate with local self-hosted runner

      • Start job
      • Get dist folder in ~/actions-runner/_work/JaMuz/JaMuz/
    • Compare it to previous release

    • Create the target-data/data/system/update/update.csv file for updating from previous version to current (the one being released).

      Copy,data/system/tests/empty/testCopy DirNoSlashNoOverwrite,false
      Copy,data/system/tests/empty/testCopy DirSlashOverwrite/,true
      Copy,data/system/tests/empty/testCopy FileNoOverwrite/existing.txt,false
      Copy,data/system/tests/empty/testCopy FileOverwrite/new.txt,true
      Remove,data/system/tests/empty/testRemove DirNoSlash
      Remove,data/system/tests/empty/testRemove File/existing.txt
      Copy,data/system/tests/filled/testCopy DirNoSlashNoOverwrite,false
      Copy,data/system/tests/filled/testCopy DirSlashOverwrite/,true
      Copy,data/system/tests/filled/testCopy FileNoOverwrite/existing.txt,false
      Copy,data/system/tests/filled/testCopy FileOverwrite/new.txt,true
      Remove,data/system/tests/filled/testRemove DirNoSlash
      Remove,data/system/tests/filled/testRemove File/new.txt
      
      1. Action can be:
        • Remove.
        • Copy.
      2. Relative path of a file or directory.
      3. Overwrite bool (Copy action only), to overwrite, or not, files already in destination (version being updated).
    • Update script to manage updates from different previous versions, using first and second parameters received by scripts.

  3. Update pom.xml (remove "-dev" suffix)

    <version>x.y.z</version>
  4. Update CHANGELOG.md

  5. Tag last commit "vx.y.z" and push. This will trigger the release github action.

  6. Check created release.

  7. Update pom.xml

    <version>x.y.z+1-dev</version>
  8. Commit (named vx.y.z-dev) & PUSH

  9. Edit created release and "Publish release".

  10. Edit gh-pages with link to new release.

Github self-hosted runner

  • Create a new self-hosted runner on WSL or directly on linux

  • Install dependencies:

    • (If required): Install Custom SSL Certificate

      sudo cp /mnt/c/IT/netskope/rootcacert.pem /usr/local/share/ca-certificates/
      sudo update-ca-certificates
    • Install maven

      sudo apt install maven
    • Install sqlite3

      sudo apt install sqlite3
  • Start the runner

    ./run.sh

Roadmap to release v1.0.0

  • Test Plan:
    • add unit tests
    • review/update functional tests
  • Do all FIXMEs
  • Update wiki, website, release notes and CHANGES.md
  • Initial options setup interface
  • Code review:
    • Exceptions handling
    • Internationalization
    • Files headers (license)
    • Javadoc