Skip to content

Commit

Permalink
chore: add commit hash
Browse files Browse the repository at this point in the history
  • Loading branch information
Hodossy, Szabolcs committed Oct 13, 2020
1 parent ccd61d0 commit 85a5bee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ jobs:
uses: actions/github-script@v3
with:
script: |
const version = github.ref.substr(10);
core.setOutput('version', version);
const version = context.ref.substr(10);
const sha = context.sha.substr(0, 10);
core.setOutput('version', `${version}+${sha}`);
- name: Prepare and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm ci
sed -i -E s/"(\"version\": )\"(.*)\"\,"/"\1\"${{ steps.get-version.outputs.version }}\"\,"/g package.json
sed -i -E s/"(const version = )'(.*)';"/"\1'${{ steps.get-version.outputs.version }}';"/g src/environments/environment.prod.ts
npm run ng -- deploy
2 changes: 1 addition & 1 deletion src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { version } from '../../package.json';
const version = '1.0.0';

export const environment = {
production: true,
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"module": "es2020",
"moduleResolution": "node",
"importHelpers": true,
"resolveJsonModule": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
Expand Down

0 comments on commit 85a5bee

Please sign in to comment.