-
Notifications
You must be signed in to change notification settings - Fork 342
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
Add build script and Travis CI #150
base: master
Are you sure you want to change the base?
Conversation
Set language to minimal
Hey @anpage thanks a lot for your contribution ! Never used travisCI but if they offer a free version we'll use it ! Imma gonna wait your feedback if you can find how to fix this i'd like to get some tests during the build of the PBO. |
Thanks for taking a look at this, @zalexki
Yep! Their services are free to any public repo on GitHub. You only have to pay if your project isn't open source.
Yeah, I ran into that. The mission wouldn't boot at all until I configured it to leave all files intact. Full disclosure though: I've only tested the mission as it is built from the Windows version of
Sure thing. I think I'd also like to refine the build script a bit too so that it loops over an array of template names instead of using copy-pasted boilerplate code. It evolved from a .bat file I was using to build it on my Windows machine before I moved to using Docker. |
hum :/ had same issue, ok on windows, not on linux. if you still have the same issue, i've tried with https://www.npmjs.com/package/gulp-armapbo which is working when you don't use the compression. |
I'll do some testing and if I can't make any progress with makepbo, I don't mind switching to the gulp plugin. I'll let you know what I find. |
Just a quick update: I finally got around to upgrading my server to the new version of Arma 3 and I upgraded the mission file too while I was at it. The PBO built using the Linux version of I'll work on enabling error checking next. |
I've added some commits that revise the build script as planned and re-enable rapifying the mission file. I tested this on my own server and everything seemed to work fine. I also tried compressing the PBO, but the mission wouldn't initialize, so I left it off. |
In the build.sh script shouldn't the template files be copied after the main files? Othewise you're overwriting the map specific files with generic. I'm using this version based on what you did and it seems to work #!/usr/bin/env bash
# Make build folder
if [ -d "build" ]; then rm -rf build; fi
mkdir -p build
MISSIONS=(A3-AATemplate.Altis A3-AA-BLUFORTemplate.Altis A3-WotPTemplate.Tanoa A3-ArmiaKrajowaTemplate.chernarus_summer)
for MISSION in ${MISSIONS[@]}; do
echo "Building ${MISSION}..."
mkdir -p build/${MISSION}
cp -r A3-Antistasi/* build/${MISSION}
cp -rf A3-Antistasi/Templates/${MISSION}/* build/${MISSION}/
rm -rf build/${MISSION}/Templates/*/
OUTPUT=$(makepbo -PN build/${MISSION} build/${MISSION}.pbo 2>&1)
RET=$?
if [[ $RET -ne 0 ]]; then
echo "Error: makepbo returned $RET"
echo "$OUTPUT"
exit 1
fi
rm -rf build/${MISSION}
done |
@anpage what about SQF/HPP/IMG minification, enabling mod support (like a RHS), some finnaly cleanup and building PDO file? |
Relevant to issue #138, this pull request implements a Bash script to build the three variants of the mission as well as a Travis CI configuration for automated builds. This allows for easy automated release deployment as demonstrated by my fork with changes for my friends' private server.
It is currently missing the deployment section of the config because it is highly specific to the github repository. Here is an example snippet for the maintainers to use and here is the link to the Travis CI docs on the subject:
This runs automated builds for every commit and uploads the PBOs to GitHub for release every time a commit is tagged. These builds take advantage of my own dockerized version of Mikero's PBO tools, but I highly encourage you to fork it and use your own.
One last thing:
makepbo
has an option to check for errors in an addon before building the PBO, but I have that disabled as this process strips out some required files. I'm going to look into being more specific with its parameters to do error checking while still including everything. This would allow Travis CI to serve its usual purpose: automated testing. If something is broken, it'll be able to report it through GitHub and email.