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

build: add comparison of MEI versions #1259

Merged
merged 35 commits into from
Jul 31, 2023

Conversation

musicEnfanthen
Copy link
Member

This PR adds an Ant target to run the MEI version comparison from build.xml. This prepares to include the comparison in the CI build process and gives the ability to include the comparison output file with releases and commits (for the dev branch).
By default, the target compares the current version (dev) to the previous version (MEI 4.0.1), but any other version can be compared via customized inputs.

New ant target tested locally and with docker.

Closes #1256

@musicEnfanthen musicEnfanthen added this to the MEI 5.0 milestone Jul 12, 2023
@github-actions github-actions bot added Component: Utils changes to utils/**/* (assigned automatically) Component: Build changes to build.xml (assigned automatically) labels Jul 12, 2023
@bwbohl
Copy link
Member

bwbohl commented Jul 18, 2023

many thanks @musicEnfanthen, this looks all good but maybe we should accompany this with adding the compiled source to https://github.com/music-encoding/schema/tree/main/4.0.1?

@musicEnfanthen
Copy link
Member Author

Yes, agree, at least the canonicalized source for 4.0.1 that is needed for the comparison. I also created "semi-manually" a canonicalized source for v3 (at least it gives the same results as the comparison that is online for v3 vs. v4)

build.xml Outdated Show resolved Hide resolved
@musicEnfanthen musicEnfanthen self-assigned this Jul 20, 2023
@musicEnfanthen
Copy link
Member Author

Accompanying PR on schema repo is available: music-encoding/schema#7

build.xml Outdated Show resolved Hide resolved
@bwbohl
Copy link
Member

bwbohl commented Jul 24, 2023

@musicEnfanthen could you resolve the tiny conflict, please?

@musicEnfanthen
Copy link
Member Author

@bwbohl Done, thanks for the pointer.

BUILD_COMMANDLINE.md Outdated Show resolved Hide resolved
build.xml Outdated Show resolved Hide resolved
build.xml Outdated Show resolved Hide resolved
@bwbohl
Copy link
Member

bwbohl commented Jul 27, 2023

Generally, it works great if the source-files are in place. But I wonder whether the $old.default should probably be fetched to temp or build instead of next to compariosn.xsl?
Moreover, we could think about moving the output to the dist.folder if one runs dist. Which makes me wonder why not by default put the build result of the taret in the build folder?

@musicEnfanthen
Copy link
Member Author

Moreover, we could think about moving the output to the dist.folder if one runs dist. Which makes me wonder why not by default put the build result of the taret in the build folder?

The comparions.html needs to be in the same folder as the resources folder to be displayed correctly (with css and js). That's the only reason why I moved the output file next to the XSLT.

build.xml Outdated Show resolved Hide resolved
@musicEnfanthen
Copy link
Member Author

musicEnfanthen commented Jul 29, 2023

Thanks for the additional improvements @bwbohl . Looks great.

Reworked your suggestions for the ant target. As sugested, it now defines the location of the default old file in the build folder (since we run canonicalize-source beforehand the build folder will be created in any case and can be used). If it does not find a file there, it will download it from the schema repo. It will fail early now when the old source file cannot be found (which is probably only possible if there is a custom user input since downloaded default file should be available). So the checks if the file is available can be skipped with later steps. I left the output folder in the utils/compare_versions directory since the html file will need the resources to be displayed correctly. We can improve and move that in the future, but would keep it for now.

In the XSLT, I refactored the version variables and guideline links so that it works now with dev and major versions.

build.xml Outdated Show resolved Hide resolved
build.xml Show resolved Hide resolved
@bwbohl
Copy link
Member

bwbohl commented Jul 31, 2023

with the two mentioned changes it works fine locally.

@musicEnfanthen
Copy link
Member Author

Unfortunately, your suggestions will not work on Win. The XSLT does not find the old.file then.

@bwbohl
Copy link
Member

bwbohl commented Jul 31, 2023

In the current state, it does not work on macOS, though…

Now working on mac and win

Co-authored-by: Benjamin W. Bohl <b.w.bohl@gmail.com>
@bwbohl bwbohl merged commit 1d59595 into music-encoding:develop Jul 31, 2023
1 check passed
@musicEnfanthen musicEnfanthen deleted the add-comparison branch July 31, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Build changes to build.xml (assigned automatically) Component: Utils changes to utils/**/* (assigned automatically)
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

create and test version comparison
3 participants