Skip to content

justinkirby/ibeam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ibeam

*

hooks api

All hooks are called with the following arguments:

-r
release dir. The directory which the release will be/was installed, e.g. /opt/voalte/lib/admin
-t
temp dir. The temporary directory which the release tarball was extracted during verification, e.g. /tmp/ibeam_9887654
-n
name of the release. This is the name component of the release, e.g. admin, wctpgw, etc..
-v
vsn. The version of the release.

If a value is not known at the time the hook is called, then the value will be “_”, i.e. an underscore

get_pre

This hook will be called before any file checks or any type of verification of arguments.

-r
release dir
-t
_
-n
release name
-v
vsn

get_post

verify_pre

verify_post

install_pre

This hook will be called before any install steps have been started. This means the release tarball exists in a temporary directory.

sh

the file must be lib/app-vsn/priv/ibeam_hooks/install_pre.sh

The sh script will be called with the following arguments:

  • tmp_dir
  • app name, foo
  • vsn, 1.2.3

The tmp_dir is the path that verify step extracted the release tarball in. ex: /tmp/ibeam_

install_post

This hook will be called after all install steps have completed.

sh

the file must be lib/app-vsn/priv/ibeam_hooks/install_post.sh

The sh script will be called with the following arguments:

  • code:root_dir()
  • app name, foo
  • vsn, 1.2.3

Example:

lib/app-vsn/priv/ibeam_hooks/install_post.sh \
   /path/to/lib/erlang/lib \
   foo 1.2.3

erl

the file must be lib/app-vsn/priv/ibeam_hooks/install_post.erl

This file will be compiled and loaded into the ibeam environment. Thus, it will have access to all functions of ibeam modules. Most notably:

  • ibeam_config
  • ibeam_utils
  • ibeam_file_utils

The values in the list of args is the same as what is passed to the sh.

Mod:hook([code:root_dir(),"foo","1.2.3"]).

Releases

No releases published

Packages

No packages published