Skip to content

Commit

Permalink
feat: refresh Dockerfile before build
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Nov 3, 2023
1 parent 5c45ce3 commit 54b5876
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ jobs:
df -h
- uses: actions/checkout@v3
- run: yarn global add tsx
- name: generate Dockerfile
run: ./makeDockerfile.ts
- name: build test images
run: ./buildTestImages.ts
- name: run test images
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ To add a proposal, see [./CONTRIBUTING.md]

- [ ] include a way to test soft patches that weren't proposals (e.g. PismoB)
- [ ] documentation and tooling for debugging
- [ ] separate console output for agd and the scripts (had been with tmux before but trouble, try Docker compose)
- [ ] remove use of `agoric-sdk:dev`; that's a concern of SDK
- [ ] separate agd and actions/test services with docker-compose (https://github.com/Agoric/agoric-sdk/discussions/8480#discussioncomment-7438329)
- [ ] separate console output for agd and the scripts (had been with tmux before but trouble, try Docker compose https://github.com/Agoric/agoric-sdk/discussions/8480#discussioncomment-7438329)
- [ ] way to query capdata in one shot (not resorting to follow jsonlines hackery)
- [ ] within each proposal, separate dirs for supporting files so images don't invalidate
3 changes: 3 additions & 0 deletions buildTestImages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import { parseArgs } from 'node:util';
import { execSync } from 'node:child_process';
import { imageNameForProposalTest, readProposals } from './common';
import { refreshDockerfile } from './makeDockerfile';

refreshDockerfile();

const options = {
match: { short: 'm', type: 'string' },
Expand Down
10 changes: 8 additions & 2 deletions makeDockerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,11 @@ for (const proposal of readProposals()) {
previousProposal = proposal;
}

const contents = blocks.join('\n');
fs.writeFileSync('Dockerfile', contents);
export function refreshDockerfile() {
const contents = blocks.join('\n');
fs.writeFileSync('Dockerfile', contents);
}

if (require.main === module) {
refreshDockerfile();
}

0 comments on commit 54b5876

Please sign in to comment.