File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,3 +87,26 @@ Test__callable_main() {
8787 return 1
8888 fi
8989}
90+
91+ # #################################################
92+ # This function will download the most recent
93+ # travis.yml file and set it in the current module.
94+ #
95+ # Fetches the most recent travis.yml file from:
96+ # https://github.com/ash-shell/travis-buildpack
97+ # #################################################
98+ Test__callable_travis () {
99+ file_location=$Ash__CALL_DIRECTORY /travis.yml
100+ if [[ ! -f " $file_location " ]]; then
101+ Logger__alert " Downloading most recent Buildpack..."
102+ curl https://raw.githubusercontent.com/ash-shell/travis-buildpack/master/travis.yml > " $file_location "
103+ if [[ $? -eq 0 ]]; then
104+ Logger__success " travis.yml file is set up in the current directory!"
105+ else
106+ Logger__error " Failed to download the most recent Buildpack... Check your network and try again."
107+ rm " $file_location "
108+ fi
109+ else
110+ Logger__error " There is already a travis.yml file located in the current directory"
111+ fi
112+ }
You can’t perform that action at this time.
0 commit comments