Skip to content

Commit

Permalink
Merge pull request #4650 from BitGo/WP-0000-fix-update-dockerfile-script
Browse files Browse the repository at this point in the history


chore(root): fix dockerfile update script
  • Loading branch information
alebusse authored Jun 24, 2024
2 parents 76c47fd + bfc75e6 commit 52dd7f7
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions scripts/update-dockerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,6 @@ async function updateDockerFile(lerna) {
.join(' && \\\n');
const linkContent = `RUN cd /var/bitgo-express && \\\n${linkers}\n`;

// add metadata about the build to docker labels
let labelContent = `LABEL created="${new Date().toUTCString()}"\n`; // add created timestamp;
labelContent += `LABEL version=${require('../modules/express/package.json').version}\n`; // set current image version from express
labelContent += `LABEL git_hash=${require('child_process').execSync(`git rev-parse HEAD`).toString().trim()}\n`; // set to latest git HEAD hash

dockerContents = dockerContents
.replace(/#COPY_START((.|\n)*)#COPY_END/, `#COPY_START\n${copyContent}#COPY_END`)
.replace(/#LINK_START((.|\n)*)#LINK_END/, `#LINK_START\n${linkContent}#LINK_END`)
.replace(/#LABEL_START((.|\n)*)#LABEL_END/, `#LABEL_START\n${labelContent}#LABEL_END`);

fs.writeFileSync('Dockerfile', dockerContents);
}

Expand Down

0 comments on commit 52dd7f7

Please sign in to comment.