Skip to content

Commit

Permalink
Include target stack for Heroku builds
Browse files Browse the repository at this point in the history
  • Loading branch information
textbook committed Jul 14, 2023
1 parent fb528ab commit 5c27746
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Generate build information for tracking deployments.
- **Clock** - includes the build time
- **User** - includes the identity of the user
- **Git** - includes the commit the build was based on and a summary of any changes from it
- **Heroku** - includes the fact that it was built in Heroku and the commit it was based on
- **Heroku** - includes the fact that it was built in Heroku, for which stack and from which commit
- **GitHub Actions** - includes the build number and URL
- **CircleCI** - includes the build number and URL
- **Netlify** - includes the build number and URL
Expand Down
6 changes: 3 additions & 3 deletions src/sources/heroku.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ describe("Heroku", () => {
expect(heroku.applies()).to.equal(false);
});

it("exposes the source version", () => {
const heroku = new Heroku({ SOURCE_VERSION: "abc1234" });
it("exposes the source version and stack", () => {
const heroku = new Heroku({ SOURCE_VERSION: "abc1234", STACK: "heroku-22" });

expect(heroku.lines()).to.deep.equal(["In: Heroku", "From: abc1234"]);
expect(heroku.lines()).to.deep.equal(["In: Heroku", "For: heroku-22", "From: abc1234"]);
});
});
2 changes: 1 addition & 1 deletion src/sources/heroku.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ export default class Heroku extends Env implements Source {
}

lines(): string[] {
return ["In: Heroku", `From: ${this.env["SOURCE_VERSION"]}`];
return ["In: Heroku", `For: ${this.env["STACK"]}`, `From: ${this.env["SOURCE_VERSION"]}`];
}
}

0 comments on commit 5c27746

Please sign in to comment.