Foreign actions support discussing
today I added this feature that default disabled. now we can create packages with non-python actions script.
Searching order: python
> bash
> makefile
> perl module
> C source
Bash version:
export WORKDIR="."
_setup(){
echo "hello from setup"
}
_build(){
echo "hello from build"
}
_check(){
echo "hello from check"
}
_install(){
echo "hello from install"
}
Perl module version:
package actions;
$ENV{WORKDIR}=".";
sub setup {
print "hello from setup\n";
}
sub build {
print "hello from build\n";
}
sub check {
print "hello from check\n";
}
sub install {
print "hello from install\n";
}
1;
Makefile version:
WORKDIR=.
setup:
echo "hello from setup"
build:
echo "hello from build"
check:
echo "hello from check"
install:
echo "hello from install"
C source version:
#include <stdio.h>
void setup(){
printf("hello from setup\n");
}
void build(){
printf("hello from build\n");
}
void check(){
printf("hello from check\n");
}
void install(){
printf("hello from install\n");
}
Python version: (default)
import os
from inary.actionsapi import get
WORKDIR='.'
def setup():
print("hello from setup")
def build():
print("hello from build")
def check():
print("hello from check")
def install():
print("hello from install")
all developers do not have to know python3 so we need different format.
Edited by 𐰀𐰞𐰃:𐰺𐰃𐰔𐰀:𐰚𐰀𐰾𐰚𐰃𐰤