-
Notifications
You must be signed in to change notification settings - Fork 32
[releases] Harmonize versions and fix PyPI publishing #1687
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
base: main
Are you sure you want to change the base?
Changes from all commits
d24f4e0
129f287
0ccad10
e4aadaa
bbf8e86
7599426
d18d73d
2c827f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| include monitoring/_version.py | ||
| recursive-include scripts/git *.py |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,14 +12,52 @@ else | |
| fi | ||
| cd "${BASEDIR}/.." || exit 1 | ||
|
|
||
| TAG="${1:-interuss/monitoring}" | ||
| if [[ "$1" == "dev" ]]; then | ||
| IMAGE_VARIANT="dev" | ||
| TAG="${2:-interuss/monitoring}" | ||
| elif [[ "$1" == "normal" ]]; then | ||
| IMAGE_VARIANT="normal" | ||
| TAG="${2:-interuss/monitoring}" | ||
| else | ||
| IMAGE_VARIANT="normal" | ||
| TAG="${1:-interuss/monitoring}" | ||
| fi | ||
| VERSION_STR=$(scripts/git/get_version.py --format pep440) | ||
| COMMIT_HASH=$(scripts/git/get_version.py --format commitsha1) | ||
| scripts/git/write_version_file.py > /dev/null | ||
|
|
||
| if [[ "${IMAGE_VARIANT}" == "normal" ]]; then | ||
| DOCKER_TAG="${TAG}" | ||
| else | ||
| DOCKER_TAG="${TAG}-dev" | ||
| fi | ||
|
|
||
| docker image build \ | ||
| -f monitoring/Dockerfile \ | ||
| -t "${TAG}" \ | ||
| --build-arg version="$(scripts/git/version.sh monitoring --long)" \ | ||
| --build-arg commit_hash="$(git rev-parse HEAD)" \ | ||
| . \ | ||
| || exit 1 | ||
| echo "=== InterUSS docker ${IMAGE_VARIANT} image build ===" | ||
| echo "Version: ${VERSION_STR}" | ||
| echo "Docker tag: ${DOCKER_TAG}" | ||
| echo "Commit hash: ${COMMIT_HASH}" | ||
| echo "======================================" | ||
|
|
||
| echo "File created by monitoring/build.sh to keep track of the latest normal image build run date time." > monitoring/image | ||
| if [[ "${IMAGE_VARIANT}" == "normal" ]]; then | ||
| docker image build \ | ||
| -f monitoring/Dockerfile \ | ||
| -t "${DOCKER_TAG}" \ | ||
| --build-arg version="${VERSION_STR}" \ | ||
| --build-arg commit_hash="${COMMIT_HASH}" \ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This changed from HEAD to COMMIT_HASH, witch may include the -dirty flag (nit: and it's not an hash). This is injected in urls by
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks; this was unintentional and just trying to put everything related to versions in get_version.py -- I've updated to use the full commit hash (in to-be-pushed commit). |
||
| . \ | ||
| || exit 1 | ||
|
|
||
| echo "File created by monitoring/build.sh to keep track of the latest normal image build run date time." > monitoring/image | ||
|
|
||
| else | ||
| docker image build \ | ||
| -f monitoring/Dockerfile \ | ||
| -t "${DOCKER_TAG}" \ | ||
| --build-arg BASE_STAGE=dev-dependencies \ | ||
| --build-arg version="${VERSION_STR}" \ | ||
| --build-arg commit_hash="${COMMIT_HASH}" \ | ||
| . \ | ||
| || exit 1 | ||
|
|
||
| echo "File created by monitoring/build.sh to keep track of the latest dev image build run date time." > monitoring/image-dev | ||
| fi | ||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are those two still needed?
uv buildon my machine don't write to build/, but I know you have restrictions with your python setup.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uv build --wheelleaves these artifacts.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, should we move them out then? build is used for other purposes, having it mixed with others artifacts may be an issue no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what the suggested action is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(With the name to be revised, really not sure about it)
So everything goes to a different directory than the one we use for others scripts.
(It should probably be git ignored as well)