rockstor / rockstor-core

Linux/BTRFS based Network Attached Storage(NAS)
http://rockstor.com/docs/contribute_section.html
GNU General Public License v3.0
553 stars 137 forks source link

Use pyproject.toml's 'version' in build.sh #2895

Open phillxnet opened 2 weeks ago

phillxnet commented 2 weeks ago

It is proposed that we normalise/centralise on the version defined in pyproject.toml within build.sh when setting the jslibs_version bash variable. This should ease further the procedures required to release rpms: where we synchronise GitHub releases to these version numbers.

phillxnet commented 2 weeks ago

What we need here is something already available with our existing openSUSE repos akin to:

Or:

phillxnet commented 2 weeks ago

Re:

  • we use Poetry to inform our build.sh of its given version for this project.
rleap15-4:/opt/rockstor # poetry version
rockstor 5.0.14

Given in build.sh we already use the following before setting jslibs_version:

poetry --version >> poetry-install.txt

to record in poetry-install.txt our live version of Poetry itself. A simple sed/parse or the like of "poetry version"'s output of "rockstor 5.0.14" should be safe to use as a means to set our bash jslibs_version variable a few lines later.

Our most recent poetry-install.txt currently already contains our overall 'rockstor' package version, e.g:

Installing the current project: rockstor (5.0.14)

via our current use in build.sh of:

poetry install -vvv --no-interaction --no-ansi >> poetry-install.txt 2>&1
phillxnet commented 2 weeks ago

We have the likes of this proposal thus far, poetry version to establish a Bash var, within our Postgres format upgrade script:

Establish Postgres database format upgrade #2780 #2787

https://github.com/rockstor/rockstor-core/blob/1ddcf4b6f6ad6a451fdaef492fe974417d4dbfe3/src/rockstor/scripts/db_upgrade.sh#L35