Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
phillxnet opened this issue Aug 27, 2024 · 4 comments
Closed

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

phillxnet opened this issue Aug 27, 2024 · 4 comments
Assignees

Comments

@phillxnet
Copy link
Member

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 phillxnet added this to the 5.1.X-X Stable release milestone Aug 27, 2024
@phillxnet
Copy link
Member Author

phillxnet commented Aug 27, 2024

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

Or:

  • we use Poetry to inform our build.sh of it's given version for this project.
  • a simple sed to extract ^version value in a compatible form for a bash variable attribution.

@phillxnet
Copy link
Member Author

phillxnet commented Aug 29, 2024

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
Copy link
Member Author

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

CURRENT_DATA_VERSION=$(cat $DATA_BASEDIR/data/PG_VERSION)

@phillxnet phillxnet self-assigned this Sep 30, 2024
phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Sep 30, 2024
Use pyproject.toml's (version = "5.0.14") via `poetry version` output:
e.g. "rockstor 5.0.14" to populate jslibs_version variable within build.sh.
Intended to ease project versioning/release strategies by having a single
point of reference for release versions. Typically rockstor-jslibs has a
GitHub released in parallel with rockstor-core.

Includes a minor build.sh logging fix re .env file source directory.
phillxnet added a commit that referenced this issue Sep 30, 2024
…rsion'-in-build.sh

Use pyproject.toml's 'version' in build.sh #2895
@phillxnet
Copy link
Member Author

Closing as:
Fixed by #2910

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant