Skip to content

Comments

CI: create versioned directory name of extracted tarball#4659

Merged
nilason merged 1 commit intoOSGeo:mainfrom
nilason:fix_release_tarball
Nov 7, 2024
Merged

CI: create versioned directory name of extracted tarball#4659
nilason merged 1 commit intoOSGeo:mainfrom
nilason:fix_release_tarball

Conversation

@nilason
Copy link
Contributor

@nilason nilason commented Nov 6, 2024

Extracting the tarball will with this create a containing directory named 'grass-x.y.z', where x, y, z stands for major, minor, micro/patch version.

Previously, the tarball created by CI was extracted to a directory named 'grass', which was a regression to accustomed and expected behaviour.

Extracting the tarball will with this create a containing directory named
'grass-x.y.z', where x, y, z stands for major, minor, micro/patch version.
@nilason nilason added this to the 8.4.1 milestone Nov 6, 2024
@nilason nilason requested a review from neteler November 6, 2024 10:55
@nilason nilason self-assigned this Nov 6, 2024
@github-actions github-actions bot added the CI Continuous integration label Nov 6, 2024
@nilason nilason changed the title CI/release: create versioned directory name of extracted tarball CI: create versioned directory name of extracted tarball Nov 6, 2024
@nilason nilason added the backport to 8.4 PR needs to be backported to release branch 8.4 label Nov 6, 2024
@nilason
Copy link
Contributor Author

nilason commented Nov 6, 2024

Now, I'm not sure whether this need to be backported at all. Isn't it the file in main that is triggered by addition of a tag?

@neteler neteler requested a review from wenzeslaus November 6, 2024 13:47
@neteler
Copy link
Member

neteler commented Nov 6, 2024

Extracting the tarball

Just for clarification: where (in the CI?) is the tarball created? Because the release tarballs contain the version in the directory name.

@nilason
Copy link
Contributor Author

nilason commented Nov 6, 2024

Extracting the tarball

Just for clarification: where (in the CI?) is the tarball created? Because the release tarballs contain the version in the directory name.

The tarball is created in CI and added to the Assets section of a release (e.g. https://github.com/OSGeo/grass/releases/tag/8.4.0). That tarball is/was named correctly, e.g. grass-8.4.0.tar.gz, but the same tarball extracted a containing directory named only grass (because of the git repo name is "grass"). With this change the container directory will be named grass-8.4.0.

This/these tarballs may (or rather should, as include/VERSION_GIT file is generated into it) be uploaded to the osgeo download server manually (in the future possibly automatically).

See discussion in GRASS-dev ML.

@neteler
Copy link
Member

neteler commented Nov 6, 2024

See discussion in GRASS-dev ML.

Oh, I had completely forgotten about this one... and it would affect the upcoming GRASS GIS 8.4.1.

@nilason
Copy link
Contributor Author

nilason commented Nov 6, 2024

See discussion in GRASS-dev ML.

Oh, I had completely forgotten about this one... and it would affect the upcoming GRASS GIS 8.4.1.

I didn't :-), and yes, that's why I hurried up with this now.

Copy link
Member

@neteler neteler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot really judge the code but full trust.

@nilason
Copy link
Contributor Author

nilason commented Nov 7, 2024

I cannot really judge the code but full trust.

To test this locally, try:

# Assuming grass repo directory name is 'grass'
cd to_grass_repo
cd ..

GRASS_V=grass-8.4.2

# before
tar -cvf ${GRASS_V}.tar --exclude=".gi*" --exclude=".tr*" --show-transformed-names grass

# with this change
tar -cvf ${GRASS_V}.tar --exclude=".gi*" --exclude=".tr*" --transform s/grass/${GRASS_V}/ --show-transformed-names grass

With the --show-transformed-names option the tar command only prints out the outcome instead of creating the tar archive too. (I added it here for testing purposes only).

@nilason nilason merged commit 53c28f3 into OSGeo:main Nov 7, 2024
a0x8o pushed a commit to a0x8o/grass that referenced this pull request Nov 11, 2024
Extracting the tarball will with this create a containing directory named
'grass-x.y.z', where x, y, z stands for major, minor, micro/patch version.
nilason added a commit that referenced this pull request Dec 2, 2024
in addition, update GitHub action versions
@nilason
Copy link
Contributor Author

nilason commented Dec 2, 2024

Backported to 8.4 with eb9cd95.

@nilason nilason removed the backport to 8.4 PR needs to be backported to release branch 8.4 label Dec 2, 2024
@nilason nilason deleted the fix_release_tarball branch February 4, 2025 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants