# todo: fix path to public depot in manifest # make sure the license bits mention the Python copy # This example is currently limited to Windows since there are # no python.org downloads for Linux, and making a portable Linux # Python build is out of the scope of this example. use P4::test { PREREQS => { OS => 'MSWin32', CATEGORY => 'WIP' }, NEED_DEFAULT_SVR => 0 }; use P4::TM { DATA_DIR => 'self' }; use P4::util qw / cat_env which /; use File::Copy::Recursive 'dircopy'; use File::Basename; P4::TM::add_mask_func sub { s/manuals\/v[0-9]{2}\.[0-9]{1}\/extensions/manuals\/vYY.H\/extensions/g; $_ }; my $p4d_path = dirname which 'p4d'; my $p4_path = dirname which 'p4'; # Ensure that no system-installed Python interferes. delete $ENV{ PATH }; $ENV{ PATH } = cat_env $p4_path, $p4d_path, 'C:\\Windows\\system32'; my ( $s, $c ) = newServer; $P4CONFIG{ P4PORT } = $ENV{ P4PORT } = $c->{ P4PORT }; chdir $c->GetRoot(); `p4 configure set server.extensions.allow.unsigned=1`; `p4 client -o | p4 client -i`; tm `p4 -ztag -F %Description% change -o`; # Default description dircopy $script_abspath =~ s/\.t$//r . '/*', 'wrap_a_trigger-python' or die "$0: $!"; tm `p4 extension --package wrap_a_trigger-python`; tm `p4 extension --install wrap_a_trigger-python.p4-extension -y`; $stdin = `p4 extension --configure ExampleInc::wrap_a_trigger-python -o`; `p4 extension --configure ExampleInc::wrap_a_trigger-python -i`; $stdin = `p4 extension --configure ExampleInc::wrap_a_trigger-python --name wrap_a_trigger-python-instance -o`; `p4 extension --configure ExampleInc::wrap_a_trigger-python --name wrap_a_trigger-python-instance -i`; tm `p4 -ztag -F %Description% change -o`; # Modified description my ( $rs, $rc ) = newReplica RPL_TYPE => 'edge-server', P4TARGET => $s->getP4PORT; $rc->use; `p4 client -o | p4 client -i`; tm `p4 -ztag -F %Description% change -o`; # Replica picks it up __DATA__ [[33,37,38,45,52], [ 'p4 -ztag -F %Description% change -o`; # Default description', ' <enter description here> ', 0, 'p4 extension --package wrap_a_trigger-python', 'Extension packaged successfully. ', 0, 'p4 extension --install wrap_a_trigger-python.p4-extension -y', ' Extension \'ExampleInc::wrap_a_trigger-python\' version \'2019.1\' installed successfully. Perform the following steps to turn on the Extension: # Create a global configuration if one doesn\'t already exist. p4 extension --configure ExampleInc::wrap_a_trigger-python # Create an instance configuration to enable the Extension. p4 extension --configure ExampleInc::wrap_a_trigger-python --name ExampleInc::wrap_a_trigger-python-instanceName For more information, visit: https://www.perforce.com/manuals/vYY.H/extensions/Content/Extensions/Home-extensions.html ', 0, 'p4 -ztag -F %Description% change -o`; # Modified description', ' OS-NNNN/WF-NNNN <Description of change> # Please choose either OS or WF JIRA issue ID and your description # Description may be multi line. # Comment lines like these beginning with \'#\' can be edited out or will # be removed automatically when change is submitted. # The description will be validated before you save. ', 0, 'p4 -ztag -F %Description% change -o`; # Replica picks it up', ' OS-NNNN/WF-NNNN <Description of change> # Please choose either OS or WF JIRA issue ID and your description # Description may be multi line. # Comment lines like these beginning with \'#\' can be edited out or will # be removed automatically when change is submitted. # The description will be validated before you save. ', 0 ] ]
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 30809 | C. Thomas Tyler |
Code drop with newer versions of Extensions. Thanks to @jason_gibon. #review-30810 @jabson_gibson |