Skip to content

Commit 0cb1ade

Browse files
josephperrottatscott
authored andcommitted
docs: add the version of angular being used to the footer
Include the version of angular being used for the build in the footer of the application
1 parent 50ee207 commit 0cb1ade

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

.github/workflows/adev-preview-build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ jobs:
2929
- name: Install node modules
3030
run: pnpm install --frozen-lockfile
3131
- name: Build adev
32-
run: pnpm bazel build //adev:build.production
32+
# `snapshot-build` config is used to stamp the exact version with sha in the footer.
33+
run: pnpm bazel build //adev:build.production --config=snapshot-build
3334
- uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@a41a2ae61301b2a8ec47d98f73ca5309a7cea932
3435
with:
3536
workflow-artifact-name: 'adev-preview'

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ jobs:
224224
- name: Install node modules
225225
run: pnpm install --frozen-lockfile
226226
- name: Build adev
227-
run: pnpm bazel build //adev:build.production --config=release
227+
# `snapshot-build` config is used to stamp the exact version with sha in the footer.
228+
run: pnpm bazel build //adev:build.production --config=snapshot-build
228229
- name: Deploy to firebase
229230
uses: ./.github/actions/deploy-docs-site
230231
with:

adev/src/app/core/layout/footer/footer.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,6 @@ <h2>Languages</h2>
115115
<a routerLink="/license" title="License text">MIT-style License</a>
116116
. Documentation licensed under
117117
<a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>
118-
.
118+
. Built by Angular at v{{angularVersion}}.
119119
</p>
120120
</div>

adev/src/app/core/layout/footer/footer.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
import {ChangeDetectionStrategy, Component} from '@angular/core';
9+
import {ChangeDetectionStrategy, Component, VERSION} from '@angular/core';
1010
import {ExternalLink} from '@angular/docs';
1111
import {RouterLink} from '@angular/router';
1212
import {ANGULAR_LINKS} from '../../constants/links';
@@ -19,5 +19,6 @@ import {ANGULAR_LINKS} from '../../constants/links';
1919
changeDetection: ChangeDetectionStrategy.OnPush,
2020
})
2121
export class Footer {
22+
protected angularVersion = VERSION.full;
2223
protected ngLinks = ANGULAR_LINKS;
2324
}

0 commit comments

Comments
 (0)