@@ -16,14 +16,14 @@ limitations under the License.
1616
1717import  {  promises  as  fsProm  }  from  'fs' ; 
1818import  *  as  path  from  'path' ; 
19+ import  {  Target ,  TargetId ,  UniversalTarget ,  WindowsTarget  }  from  'element-desktop/scripts/hak/target' ; 
1920
2021import  getSecret  from  './get_secret' ; 
2122import  GitRepo  from  './gitrepo' ; 
2223import  rootLogger ,  {  LoggableError ,  Logger  }  from  './logger' ; 
2324import  Runner ,  {  IRunner  }  from  './runner' ; 
2425import  DockerRunner  from  './docker_runner' ; 
2526import  WindowsBuilder  from  './windows_builder' ; 
26- import  {  ENABLED_TARGETS ,  Target ,  TargetId ,  UniversalTarget ,  WindowsTarget  }  from  './target' ; 
2727import  {  setDebVersion ,  addDeb  }  from  './debian' ; 
2828import  {  getMatchingFilesInDir ,  pushArtifacts ,  copyAndLog ,  rm  }  from  './artifacts' ; 
2929
@@ -99,6 +99,7 @@ export default class DesktopDevelopBuilder {
9999    private  lastFailTimes : Partial < Record < TargetId ,  number > >  =  { } ; 
100100
101101    constructor ( 
102+         private  readonly  targets : Target [ ] , 
102103        private  winVmName : string , 
103104        private  winUsername : string , 
104105        private  winPassword : string , 
@@ -122,7 +123,7 @@ export default class DesktopDevelopBuilder {
122123
123124        this . lastBuildTimes  =  { } ; 
124125        this . lastFailTimes  =  { } ; 
125-         for  ( const  target  of  ENABLED_TARGETS )  { 
126+         for  ( const  target  of  this . targets )  { 
126127            this . lastBuildTimes [ target . id ]  =  await  getLastBuildTime ( target ,  logger ) ; 
127128            this . lastFailTimes [ target . id ]  =  0 ; 
128129        } 
@@ -135,7 +136,7 @@ export default class DesktopDevelopBuilder {
135136        if  ( this . building )  return ; 
136137
137138        const  toBuild : Target [ ]  =  [ ] ; 
138-         for  ( const  target  of  ENABLED_TARGETS )  { 
139+         for  ( const  target  of  this . targets )  { 
139140            const  nextBuildDue  =  getNextBuildTime ( new  Date ( Math . max ( 
140141                this . lastBuildTimes [ target . id ] ,  this . lastFailTimes [ target . id ] , 
141142            ) ) ) ; 
0 commit comments