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

Replace Mercurial code with Git code #19

Merged
merged 6 commits into from Mar 1, 2021
Merged

Conversation

Wuzzy2
Copy link
Contributor

@Wuzzy2 Wuzzy2 commented Feb 9, 2021

PREVIEW PR! DO NOT MERGE BEFORE #13 AND #14!

This fixes #10. I have checked the Makefiles and scripts and replaced all legacy uses of hg commands (that no longer work) with equivalen git commands. I also replaced .hgignore with .gitignore.

This PR is only a preview, I will probably need to do some minor changes after #13 and #14 got merged. The scripting changes will likely stay the same, however.

@Wuzzy2
Copy link
Contributor Author

Wuzzy2 commented Feb 15, 2021

I have added a few commits authored by glx22. It's about a few bugfixes in the Makefile.

Also, GitHub Actions support will be added. Note that the PR as a whole is NOT mergable yet, the merge of #14 is still a precondition for this.

@Wuzzy2
Copy link
Contributor Author

Wuzzy2 commented Feb 25, 2021

Alright, I have updated and rebased this PR to include the changes of previous PRs.

However, I noticed a problem: OpenSFX no longer shows up in the menu when I copied the files to ~/.openttd/baseset/opensfx.
What did I do wrong?

@Wuzzy2
Copy link
Contributor Author

Wuzzy2 commented Feb 25, 2021

Alright, I figured out the cause of the problem. The description in the .obs file was no longer generated. I deleted a script that I shouldn't have deleted. :D So I restored it.

@orudge
Copy link
Contributor

orudge commented Feb 25, 2021

So, this took a bit longer than expected... needed to implement a few fixes:

  1. The unix2dos execution was failing for me on Debian 10.
  2. The -source.tar bundles weren't being generated correctly. The git archive needed to be combined with files that were being written into opensfx-1.2.3-source directory.
  3. Tagged builds weren't being named correctly - the tags was basically being ignored. Tagged builds will be named correctly now (e.g., 1.0.0), and development git builds will get a hashed name, similar to OpenTTD itself.
  4. The GitHub Actions workflow wasn't quite working correctly (was referring to an -all.zip which didn't exist, and a README.md which also didn't exist). I've tested the new workflow (short of actually publishing to openttd.org) and it's now working correctly.

I've cleaned up the commit history a bit, and personally I'm now happy with what's here. Would like a second opinion from another developer if one is available though.

@glx22
Copy link
Contributor

glx22 commented Feb 25, 2021

Basically the release workflow was just a copy/paste from opengfx, with only dependencies corrected. So it was expected to not work ;)

@Wuzzy2
Copy link
Contributor Author

Wuzzy2 commented Feb 26, 2021

Thank you for reviewing and working this. I don't know how I could continue my further here. Do you want to take over from now?

@orudge
Copy link
Contributor

orudge commented Feb 26, 2021

@glx22 It was pretty close, to be fair. :) Would you mind reviewing the PR, or at least my changes to it?

# Move bundles in their own folder
mkdir bundles
mv opensfx-${{ steps.vars.outputs.version }}-source.tar.xz bundles/
mv opensfx-${{ steps.vars.outputs.version }}.zip bundles/opensfx-${{ steps.vars.outputs.version }}-all.zip
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it would be better to fix Makefile to add "-all"
I guess it should be Makefile:352

with:
token: ${{ secrets.DEPLOYMENT_TOKEN }}
repository: OpenTTD/workflows
event-type: update_cdn
Copy link
Contributor

Choose a reason for hiding this comment

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

Issue spotted in OpenGFX, and as I copied the workflow :)

Suggested change
event-type: update_cdn
event-type: update-cdn

# Move bundles in their own folder
mkdir bundles
mv opensfx-${{ steps.vars.outputs.version }}-source.tar.xz bundles/
mv opensfx-${{ steps.vars.outputs.version }}-all.zip bundles/opensfx-${{ steps.vars.outputs.version }}-all.zip
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
mv opensfx-${{ steps.vars.outputs.version }}-all.zip bundles/opensfx-${{ steps.vars.outputs.version }}-all.zip
mv opensfx-${{ steps.vars.outputs.version }}-all.zip bundles/

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah yes, that would be more straightforward!

Copy link
Contributor

@glx22 glx22 left a comment

Choose a reason for hiding this comment

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

Should be ok now

@orudge orudge merged commit 8b9376e into OpenTTD:master Mar 1, 2021
@Wuzzy2 Wuzzy2 mentioned this pull request Mar 1, 2021
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.

Change legacy Mercurial code in scripts and README
3 participants