Meta-command support in deployment script

9 views
Skip to first unread message

Alexander Obuhovich

unread,
Sep 21, 2012, 11:10:30 AM9/21/12
to Development In-Portal
In In-Portal 5.1.3 new deployment script functionality was developed. It allows to:
  • specify revision-based database queries
  • revision dependencies

After missing (revisions that weren't executed before) are executed these actions are performed:
  • resets caches
  • import language pack
This very powerful already, but it missing ability to execute a revision-specific php code.

I see this as a meta tags, placed inside a comments, like this:

# {namespace:meta_tag_here}

There also can be several meta-tags per line. When processed we'll scan all registered namespaces and then ask them to process meta tag.


--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

Dmitry A.

unread,
Nov 12, 2012, 1:52:49 AM11/12/12
to in-por...@googlegroups.com
Yes, we definitely need some improvements, but how would the the PHP file with namespaces / meta-gats look like?

I am not quite sure I follow the format here.

DA

Alexander Obuhovich

unread,
Nov 18, 2012, 4:06:59 PM11/18/12
to Development In-Portal
It still will be SQL file. Command format as I've described before, but I'm not quite sure how to manage which code will process which command yet.

Dmitry A.

unread,
Dec 24, 2012, 1:12:00 AM12/24/12
to in-por...@googlegroups.com
I think we can continue researching and discussing on this.

In the end we want to be able to evoke some PHP code from project_upgrades.sql file so it can manipulate data with some Business Logic rather plan SQL as we do now, correct?


DA

Alexander Obuhovich

unread,
Dec 24, 2012, 7:16:18 AM12/24/12
to Development In-Portal
Yes, but without typing a PHP code right in SQL file.

Maybe we can start with simple implementation without fancy {{ and }} tags first. For example we'll call OnDeploy event from prefix, associated with module, which project_upgrades.sql is being pressed before and after each revision processing. A revision number and invocation place (before or after) will be given as parameters to an event.

How about that?

Dmitry A.

unread,
Dec 25, 2012, 4:11:44 PM12/25/12
to in-por...@googlegroups.com
Sounds interesting and quite similar to what we have for In-Portal upgrades right now - which is good.

I say we need to have 1 general "OnDeploy" associated with module, which project_upgrades.sql which can they call another customer methods from inside. To make it clean and easy to understand I would have a separate PHP file which will store base "OnDeploy" and then custom Methods created by developer that are called from within "OnDeploy" (via switch case or something)?

Am i going too far?

DA

Alexander Obuhovich

unread,
Dec 26, 2012, 4:18:29 AM12/26/12
to Development In-Portal
Not sure if having a separate file (event handler) is possible, since we already have one (e.g. "custom-sections", "p", "l") associated with each module and I was planning to re-use it.

If you in turn plan to create a separate event handler (and corresponding unit) in each module, then please explain unit prefix naming scheme, since unit prefix must be unique in each module.

Dmitry A.

unread,
Dec 27, 2012, 12:18:45 AM12/27/12
to in-por...@googlegroups.com
I guess I wasn't clear enough here.

But I think we need to make it as straight forward as possible. I like the idea how it's done with In-Portal upgrades when you can have a separate method for any upgrade so here it might a good idea too to add similar (associate with revision number) + call it whenever needed using Meta format you suggested.

DA

Alexander Obuhovich

unread,
Dec 27, 2012, 2:59:57 AM12/27/12
to Development In-Portal
I see, you mean a separate class, like InLinkDeploymentHelper, CoreDeploymentHelper, CustomDeploymentHelper and so on.

Sad that we can't actually extend it from kDeploymentHelper, but get the idea.
Reply all
Reply to author
Forward
0 new messages