The current state of the jobs is that the publishing token is
obtained right at the beginning of execution; then Android is
built; then, and only then, the publishing part takes place,
at a time in which the token might have expired already.
The solution is to obtain the token right before publishing.
Since obtaining the token is a build step in itself (not part
of a script), it means that the shell script needs to be cut
short in order to obtain the token, and then resumed.
Because we would be adding a new shell step anyway, that process
is moved onto a script that can be included directly as a build
step. This calls for a few variables to be defined, to be passed
* PUB_SRC Source directory. Default:
* PUB_DEST Destination directory. No default.
* PUB_EXTRA_INC Regexp of files to transfer. Default: none extra.
Please note that the following includes are already in:
* --include "^[^/]+[._](img[^/]*|tar[^/]*|xml|sh|config)$"
* --include "^[BHi][^/]+txt$"
* --include "^(MANIFEST|MD5SUMS|changelog.txt)$"
If any other regexps are needed, those can be added:
Signed-off-by: Daniel Díaz <firstname.lastname@example.org>