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

Fix "Last Updated" field #179

Merged
merged 3 commits into from
Jun 27, 2024
Merged

Conversation

JavierMatosD
Copy link
Collaborator

@JavierMatosD JavierMatosD commented Jun 26, 2024

NOTE: Currently, this bug is blocking the website from updating because it breaks our validation.

Problem:

The "Last Updated" date for packages was being displayed incorrectly. The rebuild script used a shallow clone of the vcpkg repository, resulting in incomplete commit history. This prevented the script from accurately determining the last time each package was updated.

Solution:

Modified rebuild.sh: Removed the --depth 1 option from the git fetch command to fetch the complete vcpkg repository history.
Updated generatePackages.js: Modified the getLastModifiedDate function to use git log -1 --format=%at to retrieve the author date (last modification time) directly from the vcpkg repository's history.

Future Work:

Site Validation now takes much more time because of the 2k+ git log operations. I will open a PR in the future to improve this by checking in a file instead of partying on the git history every time. I will also separate this functionality from the rebuild script to improve determinism.

@JavierMatosD JavierMatosD changed the title Clone the full repo instead of shallow clone Fix "Last Updated" field Jun 26, 2024
@JavierMatosD JavierMatosD merged commit 06e0c86 into vcpkg:main Jun 27, 2024
1 check passed
@JavierMatosD JavierMatosD deleted the fix_last_mod branch July 1, 2024 15:56
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

Successfully merging this pull request may close these issues.

2 participants