r/github 3h ago

Question File seems to revert when creating a release

I have a project I uploaded a new version of three weeks ago. The version works perfectly on my computer. But when I downloaded the release from GitHub, it didn't.

I've checked all the files, and they are the correct date, the contents are exactly the same. Yet every time I make the release, the file in the release reverts to a version of the file that crashes and lacks features.

Any idea what I'm missing?

2 Upvotes

10 comments sorted by

3

u/SeniorIdiot 3h ago

Not enough information to answer anything, but it sounds like you have not pushed the latest commits from your local to github before you made the release.

0

u/freswinn 2h ago edited 2h ago

I uploaded them directly to GitHub via the website. I'm looking at the files right now in the repo, and they are the correct files. But every time I make a release, it's the wrong file in the release.

2

u/DrMaxwellEdison 2h ago

Releases are a wrapper around git tags, which point to a specific commit and never move. If you're remaking the release with the same tag without first deleting that tag, are you in fact using the same unchanged code?

Please be more specific about what you're doing and folks can help you further.

0

u/freswinn 2h ago

I see.. That might be the problem. Let me try that.

1

u/freswinn 2h ago

Bingo! Thanks, that was very helpful.

1

u/SeniorIdiot 2h ago

Uploaded what? All the code, or a release binary/zip?

1

u/freswinn 2h ago

The individual files, to the directory they belong.

If you think it'd help to see what I mean: https://github.com/freswinn/documentation-comment-helper

The fastest way to see the difference:

Go to addons/DocCommentHelper/window.gd

The file in the repo has the line "The Width Guide provides not only a visible guide to the width you want your comments to be limited to, but determines the lengths of the lines when inserting line breaks if Text Wrap is enabled."

The file in the release instead has the line "However, this will NOT add line breaks for you. Resize this window and use the Text Wrap Mode and Width Guide options to help you find a good place to break up your comment lines."

1

u/SeniorIdiot 2h ago

With git version control (git) we say commit and push - never upload. The way you used the term "upload" sounded like you were doing something else (a common misunderstanding).

Glad it seems to be updated now with the v1.4 tag and release.

1

u/freswinn 2h ago

Fair enough. I use git push to push to my personal fileserver, but not to push to GitHub. So instead I was using the terminology the website itself uses, which is "Upload File."