@@ -122,7 +122,6 @@ sub _parse_options {
122
122
adcirc-git-branch=s
123
123
adcirc-git-url=s
124
124
adcirc-git-repo=s
125
- build-adcirc
126
125
clean
127
126
compiler=s
128
127
debug
@@ -703,26 +702,34 @@ sub get_steps {
703
702
704
703
# augment existing %ENV (cumulative)
705
704
export_ENV => {
706
- PATH => { value => $_get_all_paths-> (), how => q{ prepend} }, # prefer ASGS binaries and tools; full list managed above
707
- WORK => { value => $ENV {WORK } // $asgs_home // q{ } , how => q{ replace} }, # standardize across all platforms
708
- SCRATCH => { value => $ENV {SCRATCH } // $ENV {WORK } // $asgs_home // q{ } , how => q{ replace} }, # standardize across all platforms
709
- LIBRARY_PATH => { value => qq{ $asgs_install_path /lib} , how => q{ prepend} }, # for use by linkers
710
- LD_LIBRARY_PATH => { value => qq{ $asgs_install_path /lib} , how => q{ prepend} }, # for use by linkers
711
- LD_RUN_PATH => { value => qq{ $asgs_install_path /lib} , how => q{ prepend} }, # for use by binaries
712
- LD_INCLUDE_PATH => { value => qq{ $asgs_install_path /include} , how => q{ prepend} }, # for use by compilers
713
- SCRIPTDIR => { value => qq{ $scriptdir } , how => q{ replace} }, # base ASGS dir, used by asgs_main.sh
714
- PERL5LIB => { value => qq{ $scriptdir /PERL:$scriptdir /git/ourPerl} , how => q{ append} }, # place for distributed Perl libraries
715
- ADCIRC_META_DIR => { value => qq{ $asgs_home /.adcirc-meta} , how => q{ replace} }, # where to track ADCIRC builds (always)
716
- ASGS_META_DIR => { value => qq{ $asgs_home /profiles} , how => q{ replace} }, # where to track ASGS profiles (always)
717
- ASGS_BREW_FLAGS => { value => qq{ $brewflags } , how => q{ replace} }, # make brew flags available for later use
718
- ASGS_HOME => { value => qq{ $asgs_home } , how => q{ replace} }, # used in preference of $HOME in most cases
719
- ASGS_TMPDIR => { value => qq{ $asgs_tmpdir } , how => q{ replace} }, # used in preference of $TMPDIR in most cases
720
- ASGS_MACHINE_NAME => { value => qq{ $asgs_machine_name } , how => q{ replace} }, # machine referred to as in platforms.sh & cmplrflags.mk
721
- ASGS_COMPILER => { value => qq{ $asgs_compiler } , how => q{ replace} }, # compiler family designated during asgs-brew.pl build
722
- ASGS_INSTALL_PATH => { value => qq{ $asgs_install_path } , how => q{ replace} }, # where asgs-brew.pl installs supporting bins & libs
723
- ASGS_MAKEJOBS => { value => qq{ $makejobs } , how => q{ replace} }, # passed to make commands where Makefile supports
724
- ASGS_MESH_DEFAULTS => { value => qq{ $scriptdir /config/mesh_defaults.sh} , how => q{ replace} }, # list of supported meshes
725
- ASGS_PLATFORMS => { value => qq{ $scriptdir /platforms.sh} , how => q{ replace} }, # list of supported platforms
705
+ PATH => { value => $_get_all_paths-> (), how => q{ prepend} }, # prefer ASGS binaries and tools; full list managed above
706
+ WORK => { value => $ENV {WORK } // $asgs_home // q{ } , how => q{ replace} }, # standardize across all platforms
707
+ SCRATCH => { value => $ENV {SCRATCH } // $ENV {WORK } // $asgs_home // q{ } , how => q{ replace} }, # standardize across all platforms
708
+ LIBRARY_PATH => { value => qq{ $asgs_install_path /lib} , how => q{ prepend} }, # for use by linkers
709
+ LD_LIBRARY_PATH => { value => qq{ $asgs_install_path /lib} , how => q{ prepend} }, # for use by linkers
710
+ LD_RUN_PATH => { value => qq{ $asgs_install_path /lib} , how => q{ prepend} }, # for use by binaries
711
+ LD_INCLUDE_PATH => { value => qq{ $asgs_install_path /include} , how => q{ prepend} }, # for use by compilers
712
+ SCRIPTDIR => { value => qq{ $scriptdir } , how => q{ replace} }, # base ASGS dir, used by asgs_main.sh
713
+ PERL5LIB => { value => qq{ $scriptdir /PERL:$scriptdir /git/ourPerl} , how => q{ append} }, # place for distributed Perl libraries
714
+ ADCIRC_META_DIR => { value => qq{ $asgs_home /.adcirc-meta} , how => q{ replace} }, # where to track ADCIRC builds (always)
715
+ ADCIRC_GIT_BRANCH => { value => qq{ $adcirc_git_branch } , how => q{ replace} },
716
+ ADCIRC_GIT_URL => { value => qq{ $adcirc_git_url } , how => q{ replace} },
717
+ ADCIRC_GIT_REPO => { value => qq{ $adcirc_git_repo } , how => q{ replace} },
718
+ ADCIRC_COMPILER => { value => qq{ $asgs_compiler } , how => q{ replace} },
719
+ ADCIRCBASE => { value => ( not $opts_ref -> {' build-adcirc' } ) ? undef : qq{ $adcircdir -$adcirc_git_branch } , how => q{ replace} },
720
+ ADCIRCDIR => { value => ( not $opts_ref -> {' build-adcirc' } ) ? undef : qq{ $adcircdir -$adcirc_git_branch /work} , how => q{ replace} },
721
+ SWANDIR => { value => ( not $opts_ref -> {' build-adcirc' } ) ? undef : qq{ $adcircdir -$adcirc_git_branch /swan} , how => q{ replace} },
722
+ ADCIRC_PROFILE_NAME => { value => ( not $opts_ref -> {' build-adcirc' } ) ? undef : qq{ $adcirc_git_branch -$asgs_compiler } , how => q{ replace} },
723
+ ASGS_META_DIR => { value => qq{ $asgs_home /profiles} , how => q{ replace} }, # where to track ASGS profiles (always)
724
+ ASGS_BREW_FLAGS => { value => qq{ $brewflags } , how => q{ replace} }, # make brew flags available for later use
725
+ ASGS_HOME => { value => qq{ $asgs_home } , how => q{ replace} }, # used in preference of $HOME in most cases
726
+ ASGS_TMPDIR => { value => qq{ $asgs_tmpdir } , how => q{ replace} }, # used in preference of $TMPDIR in most cases
727
+ ASGS_MACHINE_NAME => { value => qq{ $asgs_machine_name } , how => q{ replace} }, # machine referred to as in platforms.sh & cmplrflags.mk
728
+ ASGS_COMPILER => { value => qq{ $asgs_compiler } , how => q{ replace} }, # compiler family designated during asgs-brew.pl build
729
+ ASGS_INSTALL_PATH => { value => qq{ $asgs_install_path } , how => q{ replace} }, # where asgs-brew.pl installs supporting bins & libs
730
+ ASGS_MAKEJOBS => { value => qq{ $makejobs } , how => q{ replace} }, # passed to make commands where Makefile supports
731
+ ASGS_MESH_DEFAULTS => { value => qq{ $scriptdir /config/mesh_defaults.sh} , how => q{ replace} }, # list of supported meshes
732
+ ASGS_PLATFORMS => { value => qq{ $scriptdir /platforms.sh} , how => q{ replace} }, # list of supported platforms
726
733
},
727
734
},
728
735
{
@@ -1097,27 +1104,29 @@ sub get_steps {
1097
1104
},
1098
1105
},
1099
1106
{
1100
- key => q{ adcirc } ,
1101
- name => q{ Build ADCIRC and SWAN } ,
1102
- description => q{ Builds ADCIRC and SWAN if $HOME/adcirc-cg exists. } ,
1107
+ key => q{ asgs-lint } ,
1108
+ name => q{ Step for installing asgs-lint } ,
1109
+ description => q{ Install asgs-lint, linter for ASGS configuration files } ,
1103
1110
pwd => qq{ $scriptdir } ,
1111
+ command => qq{ bash ./bin/fetch asgs-lint $scriptdir } ,
1112
+ clean => sub {
1113
+ local $? ;
1114
+ system (qq{ rm -rvf bin/asgs-lint git/asgs-lint} );
1104
1115
1105
- # expose ENV on if --build-adcirc is passed as an option
1106
- export_ENV => {
1116
+ # look for zero exit code on success
1117
+ my $exit_code = ( $? >> 8 );
1118
+ return ( defined $exit_code and $exit_code == 0 ) ? 1 : 0;
1119
+ },
1120
+ skip_if => sub { undef }, # if exists, bin/fetch will update the repo
1121
+ precondition_check => sub { 1 },
1122
+ postcondition_check => sub {
1123
+ local $? ;
1124
+ system (qq{ readlink -f bin/asgs-lint > /dev/null 2>&1} );
1107
1125
1108
- # always expose, always set even if not building ADCIRC
1109
- ADCIRC_GIT_BRANCH => { value => qq{ $adcirc_git_branch } , how => q{ replace} },
1110
- ADCIRC_GIT_URL => { value => qq{ $adcirc_git_url } , how => q{ replace} },
1111
- ADCIRC_GIT_REPO => { value => qq{ $adcirc_git_repo } , how => q{ replace} },
1112
- ADCIRC_COMPILER => { value => qq{ $asgs_compiler } , how => q{ replace} },
1113
- ADCIRCBASE => { value => ( not $opts_ref -> {' build-adcirc' } ) ? undef : qq{ $adcircdir -$adcirc_git_branch } , how => q{ replace} },
1114
- ADCIRCDIR => { value => ( not $opts_ref -> {' build-adcirc' } ) ? undef : qq{ $adcircdir -$adcirc_git_branch /work} , how => q{ replace} },
1115
- SWANDIR => { value => ( not $opts_ref -> {' build-adcirc' } ) ? undef : qq{ $adcircdir -$adcirc_git_branch /swan} , how => q{ replace} },
1116
- ADCIRC_PROFILE_NAME => { value => ( not $opts_ref -> {' build-adcirc' } ) ? undef : qq{ $adcirc_git_branch -$asgs_compiler } , how => q{ replace} },
1126
+ # look for zero exit code on success
1127
+ my $exit_code = ( $? >> 8 );
1128
+ return ( defined $exit_code and $exit_code == 0 ) ? 1 : 0;
1117
1129
},
1118
- command => qq{ bash $scriptdir /bin/init-adcirc.sh -b -N v55.02} , # Note: parameters input via environmental variables
1119
- clean => qq{ bash $scriptdir /bin/init-adcirc.sh clean} ,
1120
- skip_if => sub { ( $opts_ref -> {' build-adcirc' } ) ? undef : 1 }, # builds only if --build-adcirc is passed to asgs-brew.pl
1121
1130
},
1122
1131
];
1123
1132
return $steps ;
0 commit comments