@@ -142,7 +142,7 @@ describe('deploy-to-firebase:', () => {
142142 `(${ getLatestCommitForBranch ( '2.4.x' ) } ).` ) ;
143143 } ) ;
144144
145- it ( 'archive - skip deploy - major version too high, lower minor' , ( ) => {
145+ it ( 'archive - skip deploy - major same as stable, minor less than stable ' , ( ) => {
146146 expect ( deployToFirebaseDryRun ( {
147147 CI_REPO_OWNER : 'angular' ,
148148 CI_REPO_NAME : 'angular' ,
@@ -153,11 +153,41 @@ describe('deploy-to-firebase:', () => {
153153 CI_SECRET_AIO_DEPLOY_FIREBASE_TOKEN : 'XXXXX' ,
154154 } ) ) . toBe (
155155 'Skipping deploy of branch "2.1.x" to Firebase.\n' +
156- 'We only deploy archive branches with the major version less than the stable branch: ' +
157- '"2.2.x"' ) ;
156+ 'There is a more recent branch with the same major version: "2.4.x"' ) ;
158157 } ) ;
159158
160- it ( 'archive - skip deploy - major version too high, higher minor' , ( ) => {
159+ it ( 'archive - skip deploy - major lower than stable, minor not latest' , ( ) => {
160+ expect ( deployToFirebaseDryRun ( {
161+ CI_REPO_OWNER : 'angular' ,
162+ CI_REPO_NAME : 'angular' ,
163+ CI_PULL_REQUEST : 'false' ,
164+ CI_BRANCH : '2.1.x' ,
165+ CI_STABLE_BRANCH : '4.3.x' ,
166+ CI_COMMIT : getLatestCommitForBranch ( '2.1.x' ) ,
167+ CI_SECRET_AIO_DEPLOY_FIREBASE_TOKEN : 'XXXXX' ,
168+ } ) ) . toBe (
169+ 'Skipping deploy of branch "2.1.x" to Firebase.\n' +
170+ 'There is a more recent branch with the same major version: "2.4.x"' ) ;
171+ } ) ;
172+
173+ it ( 'rc - deploy success - major higher than stable' , ( ) => {
174+ expect ( deployToFirebaseDryRun ( {
175+ CI_REPO_OWNER : 'angular' ,
176+ CI_REPO_NAME : 'angular' ,
177+ CI_PULL_REQUEST : 'false' ,
178+ CI_BRANCH : '4.4.x' ,
179+ CI_STABLE_BRANCH : '2.2.x' ,
180+ CI_COMMIT : getLatestCommitForBranch ( '4.4.x' ) ,
181+ CI_SECRET_AIO_DEPLOY_FIREBASE_TOKEN : 'XXXXX' ,
182+ } ) ) . toBe (
183+ 'Git branch : 4.4.x\n' +
184+ 'Build/deploy mode : rc\n' +
185+ 'Firebase project : angular-io\n' +
186+ 'Firebase site : rc-angular-io-site\n' +
187+ 'Deployment URL : https://rc.angular.io/' ) ;
188+ } ) ;
189+
190+ it ( 'rc - deploy success - major same as stable, minor higher' , ( ) => {
161191 expect ( deployToFirebaseDryRun ( {
162192 CI_REPO_OWNER : 'angular' ,
163193 CI_REPO_NAME : 'angular' ,
@@ -167,22 +197,52 @@ describe('deploy-to-firebase:', () => {
167197 CI_COMMIT : getLatestCommitForBranch ( '2.4.x' ) ,
168198 CI_SECRET_AIO_DEPLOY_FIREBASE_TOKEN : 'XXXXX' ,
169199 } ) ) . toBe (
170- 'Skipping deploy of branch "2.4.x" to Firebase.\n' +
171- 'We only deploy archive branches with the major version less than the stable branch: ' +
172- '"2.2.x"' ) ;
200+ 'Git branch : 2.4.x\n' +
201+ 'Build/deploy mode : rc\n' +
202+ 'Firebase project : angular-io\n' +
203+ 'Firebase site : rc-angular-io-site\n' +
204+ 'Deployment URL : https://rc.angular.io/' ) ;
205+ } ) ;
206+
207+ it ( 'rc - skip deploy - commit not HEAD' , ( ) => {
208+ expect ( deployToFirebaseDryRun ( {
209+ CI_REPO_OWNER : 'angular' ,
210+ CI_REPO_NAME : 'angular' ,
211+ CI_PULL_REQUEST : 'false' ,
212+ CI_BRANCH : '2.4.x' ,
213+ CI_STABLE_BRANCH : '2.2.x' ,
214+ CI_COMMIT : 'DUMMY_TEST_COMMIT' ,
215+ CI_SECRET_AIO_DEPLOY_FIREBASE_TOKEN : 'XXXXX' ,
216+ } ) ) . toBe (
217+ 'Skipping deploy because DUMMY_TEST_COMMIT is not the latest commit ' +
218+ `(${ getLatestCommitForBranch ( '2.4.x' ) } ).` ) ;
173219 } ) ;
174220
175- it ( 'archive - skip deploy - minor version too low ' , ( ) => {
221+ it ( 'rc - skip deploy - major same as stable, minor not latest ' , ( ) => {
176222 expect ( deployToFirebaseDryRun ( {
177223 CI_REPO_OWNER : 'angular' ,
178224 CI_REPO_NAME : 'angular' ,
179225 CI_PULL_REQUEST : 'false' ,
180226 CI_BRANCH : '2.1.x' ,
181- CI_STABLE_BRANCH : '4.3 .x' ,
227+ CI_STABLE_BRANCH : '2.0 .x' ,
182228 CI_COMMIT : getLatestCommitForBranch ( '2.1.x' ) ,
183229 CI_SECRET_AIO_DEPLOY_FIREBASE_TOKEN : 'XXXXX' ,
184230 } ) ) . toBe (
185231 'Skipping deploy of branch "2.1.x" to Firebase.\n' +
186232 'There is a more recent branch with the same major version: "2.4.x"' ) ;
187233 } ) ;
234+
235+ it ( 'rc - skip deploy - major higher than stable, minor not latest' , ( ) => {
236+ expect ( deployToFirebaseDryRun ( {
237+ CI_REPO_OWNER : 'angular' ,
238+ CI_REPO_NAME : 'angular' ,
239+ CI_PULL_REQUEST : 'false' ,
240+ CI_BRANCH : '4.3.x' ,
241+ CI_STABLE_BRANCH : '2.4.x' ,
242+ CI_COMMIT : getLatestCommitForBranch ( '4.3.x' ) ,
243+ CI_SECRET_AIO_DEPLOY_FIREBASE_TOKEN : 'XXXXX' ,
244+ } ) ) . toBe (
245+ 'Skipping deploy of branch "4.3.x" to Firebase.\n' +
246+ 'There is a more recent branch with the same major version: "4.4.x"' ) ;
247+ } ) ;
188248} ) ;
0 commit comments