1

I am trying to implement app version on my angular 8 app. Currently I am using four environment.In each environment I m using AWS code pipeline to deploy my code as well as in each environment inside pipe line i am running ng build . Due to run of ng build in each environment I am facing issue to manage my app version. Is there any to manage version stamping of my app. For each environment my environment specific jenkins job run ng build and put build on S3 bucket.

BugResolver
  • 85
  • 1
  • 7
  • Does this answer your question? [How to insert a Build Number or Timestamp at build time in AngularCLI](https://stackoverflow.com/questions/41733660/how-to-insert-a-build-number-or-timestamp-at-build-time-in-angularcli) – Vova Bilyachat Jul 29 '20 at 05:41
  • Then similar to this but azure version https://stackoverflow.com/questions/59249434/azure-devops-angular-environment-variables/59249554#59249554 – Vova Bilyachat Jul 29 '20 at 05:41
  • I think it's not what he is looking for, because he wants to put the version when only it's passed the code build on AWS pipeline. – critrange Jul 29 '20 at 05:43
  • https://www.npmjs.com/package/semantic-release, i think this can be helpful – critrange Jul 29 '20 at 05:44
  • main issue is I am running ng build on each environment. – BugResolver Jul 29 '20 at 05:44
  • when do you want to upgrade your version? – critrange Jul 29 '20 at 05:45
  • 1
    But thats a point why do you need to build per environment. Idea is to build once then deploy to environment – Vova Bilyachat Jul 29 '20 at 05:45
  • 1
    @VolodymyrBilyachat, that sounds right, it can be released with one`ng build` and distributed to 4 envs, right? – critrange Jul 29 '20 at 05:46
  • 1
    @yash correct. Benefit of this you build and deploy to test. Your team test this version, then you promote same built version to staging then production. – Vova Bilyachat Jul 29 '20 at 05:47
  • awesome @VolodymyrBilyachat, why dont you add it as an answer? :) – critrange Jul 29 '20 at 05:48
  • Because if you build per environemnt imaging you deployed to test, your team tested, during that time some library released new minor version and its allowed in your package.json. Then you run npm i, ng build and now its different version since it contains new version of librarry – Vova Bilyachat Jul 29 '20 at 05:48
  • 1
    @yash I already answered that in two places, and posted links here. No reason to keep duplicates ;) – Vova Bilyachat Jul 29 '20 at 05:49
  • wow those were your answers :D – critrange Jul 29 '20 at 05:50
  • @yash I just wnat to update in prod but it must reflect in other env too. – BugResolver Jul 29 '20 at 06:07

0 Answers0