Website question
Moderator: OpenTTD Developers
Website question
I've been curious lately.
How are you guys retrieving the revision number of the nightly and building the changelog?
I maintain a open source project and have wondered what the easiest approach would be. I've contemplated installing php_svn extension onto PHP, but I'm not fond of using it as it's a somewhat quirky beta. (From version to version, they break things since it's so new!)
Thanks in advance!
Elliott
How are you guys retrieving the revision number of the nightly and building the changelog?
I maintain a open source project and have wondered what the easiest approach would be. I've contemplated installing php_svn extension onto PHP, but I'm not fond of using it as it's a somewhat quirky beta. (From version to version, they break things since it's so new!)
Thanks in advance!
Elliott
Re: Website question
We've got basically a cron job that daily checks out trunk, determines it's revision and the changelog up to a week back. Besides that it builds the binaries too.
After compiling we update a text file and that text file is used by the website to determine what version to show.
After compiling we update a text file and that text file is used by the website to determine what version to show.
Re: Website question
Ah. I run a nightly cron as well for my project. How are you getting the revision number via the cron and also building that text file? That'd be handy to add.
Thanks for the quick reply, btw.
Thanks for the quick reply, btw.

Re: Website question
Bit of scripting and use of svn info and awk.
Re: Website question
The current SVN number is simple to retrieve by 'svn info repo-root-url', and pulling out the number from the right line ('Revision: <num>' iirc).
Re: Website question
It became a very complicated set of scripts which react and interact with eachother .. I doubt releasing those scripts would help you out
But the things you want:
findversion.sh in trunk/ in our SVN shows how we retrieve the revision (hg, git, svn).
The changelog is simply a 'svn log' with the correct params .. can't remember which, too lazy to look them up, but google will show you I guess

findversion.sh in trunk/ in our SVN shows how we retrieve the revision (hg, git, svn).
The changelog is simply a 'svn log' with the correct params .. can't remember which, too lazy to look them up, but google will show you I guess

The only thing necessary for the triumph of evil is for good men to do nothing.
Re: Website question
Well, just referring me to the command and concepts got me going
And then on my downloads page I just parse the
In said file. And using
I get the 30 latest revisions.
Code: Select all
svn info /svn --xml >> rev.xml
Code: Select all
<commit revision="44">
Code: Select all
svn log /svn --limit 30 >> changelog.txt
Re: Website question
there is an option for svn log to use dates/times instead of revisions, but don't ask me about the syntax/format...
Re: Website question
svnbook.red-bean.com would help you quite a bit!
Re: Website question
Thanks guys, and I'll look into using date instead of revision, but I think for nightlies in my project, a changelog of the last 30 will suffice. (I'm the only developer at the moment)
I've got the check fully working, and decided to not implement the changelog just yet. If you guys are wondering what I'm working on: http://elliottdev.co.cc
I've got the check fully working, and decided to not implement the changelog just yet. If you guys are wondering what I'm working on: http://elliottdev.co.cc
Re: Website question
[off-topic]ElliottB wrote: I've got the check fully working, and decided to not implement the changelog just yet. If you guys are wondering what I'm working on: http://elliottdev.co.cc
You may want to work on the "about"...
After reading this, I have still no idea what your project is about. Only after clicking on "Vehicles" on the left, I know that it must be something with cars.The SARP project is a new project on the block. We’re the revival of many old dreams in one solid project. We hope to have major releases of our interpretation of what a roleplay gamemodes of SA-MP should be. Expect good things! Read our blog and check our bug tracker for progress!
[/off-topic]
Re: Website question
i thought it was about squeezing as many lines as possible into the single source file one has!
45122 lines in one single source file is kinda over the top, don't you think?
45122 lines in one single source file is kinda over the top, don't you think?
Re: Website question
i have one with 69258 lines.
granted, it is an autogenerated file, but still...
granted, it is an autogenerated file, but still...
Re: Website question
Yeah, I've gotten behind on the about. Though, the about does say it is a gamemode for SA-MP. And a quick google search of SA-MP will tell you that SA-MP is a project which add multiplayer to GTA SA.Roujin wrote:[off-topic]ElliottB wrote: I've got the check fully working, and decided to not implement the changelog just yet. If you guys are wondering what I'm working on: http://elliottdev.co.cc
You may want to work on the "about"...After reading this, I have still no idea what your project is about. Only after clicking on "Vehicles" on the left, I know that it must be something with cars.The SARP project is a new project on the block. We’re the revival of many old dreams in one solid project. We hope to have major releases of our interpretation of what a roleplay gamemodes of SA-MP should be. Expect good things! Read our blog and check our bug tracker for progress!
[/off-topic]
Sadly, with the way PAWN is implemented with SA-MP you can't really have multiple source files. Also, the implementation of PAWN is of the compiled kind, instead of JIT, and regardless of how many files I can make it, they end up in one *.amx file. However, I do intend to separate parts of the code into includes (The functions that are generic enough), and also split off parts of the code that don't depend on the rest. The parts that don't depend on the rest can be made into what are called 'filterscripts', or additional scripts running along side the gamemode. Filterscripts can share variables to some degree, but I don't have it down enough to be comfortable splitting off big chunks.dihedral wrote:i thought it was about squeezing as many lines as possible into the single source file one has!
45122 lines in one single source file is kinda over the top, don't you think?

Thanks for the comments guys, btw.
![Pleased :]](./images/smilies/pleased.gif)
Edit: After some figuring.. I can split it up! Woo! However, I'm only going to be able to split off bits that don't rely on global variables.
Who is online
Users browsing this forum: No registered users and 3 guests