FORUMS

AUTOMATER for ROMs

60 posts
Thanks Meter: 244
 
By Dhruvgera, Member on 2nd April 2020, 01:56 PM
Post Reply Email Thread
AUTOMATER

One command automation for most things


Well, being a ROM developer/maintainer, we spend time in uselessly cloning trees, giving build commands, going through build logs to see where the error is and in the end upload the files and manually get links. And there is no denying that all of this is time consuming. So I made a program to do all of this automagically for you

This program can do:
  • Trigger the build of your ROM
  • Send message about the build status
  • Upload the build and target files to any SFTP client
  • Send you the direct download links
  • Send the build log
  • If the build fails, abort other statements, and send you trimmed build logs
  • Clean everything and restore the server to the previous state
  • Can be integrated with Jenkins to provide 1 click builds
  • Some other miscellanous functionality

Now, moving on to how to use it. This needs you to clone the given source into the scripts folder, which should be located inside the ROM directory. Also, the script assumes that you have clone your ROM sources inside a folder placed in the home directory.
The script is executed by the command :
Code:
devicename="yourdevicebuildname" bash scripts/CI/main.sh
You need to add some stuff in the main.sh file located inside the scripts/CI folder before you can actually use this. They are:
  • Your telegram CHAT_ID, the place where you will recive all the info
  • Your BOT API KEY, make a bot through BotFather on Telegram and paste the key
  • Your SFTP client username, I prefer Sourceforge
  • Your SFTP client password, once again, I prefer Sourceforge

If you want some other client, you have to alter the rom.py and tgt.py where you can write the client name of your choice.
Also, this script is pre-configured for CygnusOS. So naturally, you will want it for your ROM, to replace the variables, you can just run
Code:
sed -i -e "s/cygnus/your_rom_name/g" $(grep -RI cygnus $(ls)) &&  sed -i -e "s/Cygnus/Your_rom_name/g" $(grep -RI Cygnus $(ls))
NOTE: CYGNUS GENERATES THE ROM ZIP IN THE ROM DIRECTORY ITSELF INSTEAD OF THE USUAL OUT/TARGET ETC ETC PATH, SO YOU NEED TO CHANGE THE ROM.PY AS FOLLOWS:
Code:
Find the "." and replace it with out/target/product/"+devicename+"/ "

Also, edit the localfilepath to "out/target/product/"+devicename+"/"+name
That's it guys! Now just take a deep breath and leave it all, the script will do everything for you and even remove the generated zip! Yeah, make clean if that's what you wanna hear

Hit the thanks button if you find this helpful
Also, if you wanna support me, buy me a cup of coffee
PayPal

XDA:DevDB Information
AUTOMATER for ROMs, Tool/Utility for all devices (see above for details)

Contributors
Dhruvgera
Source Code: https://github.com/Dhruvgera/custom_python_scripts


Version Information
Status: Stable
Current Stable Version: v1.0
Stable Release Date: 2020-04-02

Created 2020-04-02
Last Updated 2020-04-02
The Following 4 Users Say Thank You to Dhruvgera For This Useful Post: [ View ] Gift Dhruvgera Ad-Free
2nd April 2020, 02:27 PM |#3  
Ragy747's Avatar
Member
Flag Alexandria
Thanks Meter: 230
 
More
Great work
2nd April 2020, 02:46 PM |#4  
OP Member
Thanks Meter: 244
 
More
Quote:
Originally Posted by Ragy747

Great work

2nd April 2020, 02:48 PM |#5  
pranaya2005's Avatar
Senior Member
Flag Ranchi
Thanks Meter: 148
 
More
Uwu
15th April 2020, 06:13 AM |#7  
Senior Member
Flag Near Queen of Hills
Thanks Meter: 753
 
Donate to Me
More
Quote:
Originally Posted by blitzfire3

PERU

U Too
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes