Page 1 of 1

Addon releaser version 2 [Cross Platform]

Posted: Wed Sep 10, 2014 10:35 pm
by BackRaw
I created a small "addon releaser". The script needs to be placed like this:

Code: Select all

./release.py
./testplugin/testplugin.py
./test2/test2.py
It can also be under ./addons/source-python/plugins. To use it:

Code: Select all

python spreleaser.py <addon name>
Note: <addon name> without the .py extension (didn't create a check for it..)!

Script: https://github.com/backraw/source.python/blob/master/spreleaser.py

Hope it saves a bit time...

Posted: Thu Sep 11, 2014 1:00 am
by Doldol
Aww but Python can do this cross-platform!
Zip: https://docs.python.org/3.4/library/zipfile.html
File operations: https://docs.python.org/3.4/library/shutil.html

I also think you'll never encounter the FileNotFoundError exception with subprocess.call. =]

Posted: Thu Sep 11, 2014 7:15 am
by BackRaw
Doldol wrote:Aww but Python can do this cross-platform!
Zip: https://docs.python.org/3.4/library/zipfile.html
File operations: https://docs.python.org/3.4/library/shutil.html

I also think you'll never encounter the FileNotFoundError exception with subprocess.call. =]


Thanks, gonna look into it. Yeah I guesso, but I didn't want exceptions to be thrown with this script so I went the just to be sure way. :D

Posted: Thu Sep 11, 2014 8:08 am
by BackRaw
Updated it to be Cross Platform :)

Posted: Fri Sep 12, 2014 2:27 am
by Doldol
Yay! Nice! But your just-to-be-sure way could fail silently (no permissions etc).

Posted: Fri Sep 12, 2014 6:07 am
by BackRaw
Of course :) but people should know that writing a file nedds permissions lol

Posted: Fri Sep 12, 2014 3:43 pm
by BackRaw
Ooooooops, I just saw an error :D