Ulysses

General => Off-Topic => Topic started by: iViscosity on January 24, 2017, 07:37:57 AM

Title: Ulx Build
Post by: iViscosity on January 24, 2017, 07:37:57 AM
I just had a quick question, how is the ulx.build (https://github.com/TeamUlysses/ulx/blob/master/ulx.build) determined?
Title: Re: Ulx Build
Post by: Megiddo on January 24, 2017, 06:28:25 PM
It's Unix Epoch time. It's added to every commit with a Git hook that all the ULX devs have. I can share the script of you'd like.
Title: Re: Ulx Build
Post by: iViscosity on January 24, 2017, 06:33:35 PM
It's not really the specific build you use, I want to make my own build for some projects I'm working on but I don't know how to number them.


Can I just make it any number I want?
Title: Re: Ulx Build
Post by: Stickly Man! on January 25, 2017, 10:14:49 AM
Yes, you can use any number system you like, but the general idea is higher number = newer version. We use a script to automatically set it to a timestamp because:
 1) If two developers commit at the same time without getting the other newer build number, the build number would not have incremented two times
 2) We're lazy and would likely forget to bump the build number, thus preventing our update checker from downloading the latest changes. :P
Title: Re: Ulx Build
Post by: iViscosity on January 25, 2017, 10:15:45 AM
How would you run that because I'm a very forgetful person

Sent from Tapatalk. Owner of iViscosity Gaming.

Title: Re: Ulx Build
Post by: Stickly Man! on January 25, 2017, 10:18:48 AM
Git pre and post commit hooks. I can't remember if Megiddo or I wrote the actual hooks we are using, but it gets the job done. Since our hooks are technically public, I will post them here:

*Disclaimer* This is advanced stuff and is not perfect, may cause glitches with certain git clients, etc.
https://github.com/TeamUlysses/git-hooks
Title: Re: Ulx Build
Post by: iViscosity on January 25, 2017, 02:25:44 PM
So do you use that with a webhook or something? I'm confused as to how that works, which probably means I should use it :P
Title: Re: Ulx Build
Post by: Bytewave on January 25, 2017, 03:13:20 PM
So do you use that with a webhook or something? I'm confused as to how that works, which probably means I should use it :P
Git hooks go in the .git metadata directory Git creates when you git init or git clone a repository. Specifically, they go in .git/hooks with the names describing when they should execute.
Title: Re: Ulx Build
Post by: iViscosity on January 26, 2017, 05:15:58 AM
Ah, thanks. I just got Git recently so I'm still new to it.
Title: Re: Ulx Build
Post by: Megiddo on January 28, 2017, 04:14:14 PM
Git pre and post commit hooks. I can't remember if Megiddo or I wrote the actual hooks we are using, but it gets the job done.

You wrote the initial version, and I generalized so it would work across all our repositories.

Let me emphasize, however, that this is the solution we chose, but may not be the best option for you.
Title: Re: Ulx Build
Post by: iViscosity on January 28, 2017, 11:23:30 PM
You wrote the initial version, and I generalized so it would work across all our repositories.

Let me emphasize, however, that this is the solution we chose, but may not be the best option for you.

I probably won't use the exact version, but I'd like something to be automated when I use it, as I feel like that would make it much easier in case I forget and I can always have a script test if it's smaller than the incremented number for outdated-ness.