go-modules-by-example / index

Go modules by example is a series of work-along guides
BSD 3-Clause "New" or "Revised" License
1.09k stars 90 forks source link

Be more atomic in our operations with example repos #86

Open myitcv opened 6 years ago

myitcv commented 6 years ago

At the moment we follow this sort of pattern at the start of an example:

now=$(date +'%Y%m%d%H%M%S_%N')
githubcli repo renameIfExists $GITHUB_ORG/$r ${r}_$now
githubcli repo transfer $GITHUB_ORG/${r}_$now $GITHUB_ORG_ARCHIVE
githubcli repo create $GITHUB_ORG/$r

But this means that for the entire of the regen of the example we are "missing" the real repo.

Instead we should switch to doing renames and transfers at the end of the example which will minimise downtime.

myitcv commented 6 years ago

Actually unclear whether we can get this to work, because doing work into a temporary repo will mean that resolution of import paths will fail.