Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(root): fix dockerfile update script #4650

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading