File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ def setFlywayDev(dbScripts) {
165165}
166166
167167def isDevProfile (String profile ) {
168- return profile == null || profile . equalsIgnoreCase( " integration" ) || profiles . equalsIgnoreCase( " dev" );
168+ profile in [ " integration" , " dev" , " test " , " local " ]
169169}
170170
171171def addDevScriptsToMigrations (dbScripts ) {
@@ -175,9 +175,23 @@ def addDevScriptsToMigrations(dbScripts) {
175175
176176def setFlywayPrefrences (profiles , dbScripts ) {
177177 if (profiles != null ) {
178+ def ListOfProfiles = []
178179 boolean isList = profiles instanceof List ;
180+ boolean isStr = profiles instanceof String ;
181+
182+ if (isList) {
183+ ListOfProfiles = profiles
184+ }
185+
186+ // string of profiles delimated by a comma.
187+ if (isStr) {
188+ ListOfProfiles = profiles. split(' ,' );
189+ isList = ListOfProfiles . size() > 1 ;
190+ }
191+
179192 if (isList) {
180- for (String prof in profiles) {
193+ for (String prof in ListOfProfiles ) {
194+ println (prof)
181195 if (isDevProfile(prof)) {
182196 setFlywayDev(dbScripts);
183197 break ;
You can’t perform that action at this time.
0 commit comments