actions API'a text değişken göndermek için en makul yol ENVIRONMENT tanımlamak.
This commit is contained in:
@@ -56,6 +56,15 @@ class PisiBuild:
|
|||||||
curDir = os.getcwd()
|
curDir = os.getcwd()
|
||||||
|
|
||||||
locals = globals = {}
|
locals = globals = {}
|
||||||
|
# put the evironment variables for actions API to use.
|
||||||
|
evn = {
|
||||||
|
"PKG_DIR": self.ctx.pkg_dir(),
|
||||||
|
"WORK_DIR": self.ctx.pkg_work_dir(),
|
||||||
|
"INSTALL_DIR": self.ctx.pkg_install_dir(),
|
||||||
|
"SRC_NAME": self.spec.source.name,
|
||||||
|
"SRC_VERSION": self.spec.source.version
|
||||||
|
}
|
||||||
|
os.environ.update(evn)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
exec compile(self.actionScript , "error", "exec") in locals,globals
|
exec compile(self.actionScript , "error", "exec") in locals,globals
|
||||||
|
|||||||
Reference in New Issue
Block a user