contact me at [email protected] link

ko-fi

I’ve been wanting to do this for a while now. Since I moved on to SVN from git, there has been a certain lack of green squares on my github profile page. I thought it would look bad on my portfolio, also, I keep saying I’m working on my game, but there was no way to prove it unless I do a dev broadcast or something like that. So I decided to write a script that can listen when a svn commit is made, it would update something on a small git repository, then that git repo would automatically push to github, which would let everyone know I’m actually doing things. I’m planning to release the game when I think it’s ready(the pre-alpha versions are at https://docs.whatthesamuel.com)

First I did a bit of reasearch and found out that there were some hooks that I could use in the SVN server folder. I looked around a bit more and found out that there was a file called ‘post-commit.tmpl’ which could be renamed to ‘post-commit’ to make svn do things, well, post commit.

I first tried to do the entire process in this file, but turns out, there were user permission issues since I had a git user for git stuff and svn was being handled by the web server (www-data). So I separated the scripts.

image

This is the post-commit file. As you’ll see, I’ve made an update bash script that this file can call with two arguments(the noVNC console removed the underscore from the TXN_NAME).

image

Here’s the update script. Not much, it just logs out what revision has been updated. I wanted to include the commit message too, but the svn hook doesn’t seem to pass down an argument including the message, so for now, this would have to suffice. This has been fixed and the post-commit file is on the github repo.

image

This is the script that runs in the background. It uses the inotifywait command to look for any changes in the small git repo I made with a changes.txt file. If there are any, it will commit and push to origin, in this case, github.

image

And of course, running in the background.

So from now on, you can check the status of the development of the game on my repo(link). I’ll be keep working on it and release it to steam when I’m ready, so please keep an eye on it! Also if you have a better solution to doing this, please let me know in the comments!