File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 npm i
2020 version=`git describe --tags`
2121 sed -i "s/0.0.0-version-placeholder/$version/g" ./projects/sim-api/package.json
22- npm run -- ng build SimApi -c production --define SimApiVersion=$version
22+ sed -i "s/0.0.0/$version/g" ./projects/sim-api/src/version.ts
23+ npm run -- ng build SimApi -c production
2324 npm publish ./dist/sim-api --access public
2425 env :
2526 NODE_AUTH_TOKEN : ${{secrets.NPM_APIKEY}}
Original file line number Diff line number Diff line change @@ -2,12 +2,12 @@ import {Injectable} from '@angular/core';
22import { HttpClient , HttpHeaders } from '@angular/common/http' ;
33import { Observable } from 'rxjs' ;
44import { SimApiConfigService } from './simapi-config.service' ;
5+ import { SimApiVersion } from "../version" ;
56
67type Callback = {
78 [ key in number | string ] : ( data : any ) => void | any ;
89} ;
910
10- declare const SimApiVersion : string ;
1111declare const AppVersion : string ;
1212
1313@Injectable ( {
@@ -30,7 +30,7 @@ export class SimApiService {
3030
3131 get versions ( ) {
3232 return {
33- AppVersion : AppVersion ,
33+ AppVersion : AppVersion ?? '0.0.0' ,
3434 SimApiVersion : SimApiVersion
3535 }
3636 }
Original file line number Diff line number Diff line change @@ -5,3 +5,4 @@ export * from './lib/simapi.service';
55export * from './lib/simapi-auth.service' ;
66export * from './lib/simapi.module' ;
77export * from './lib/simapi-config.service' ;
8+ export * from './version' ;
Original file line number Diff line number Diff line change 1+ export const SimApiVersion = '0.0.0' ;
You can’t perform that action at this time.
0 commit comments