-
Notifications
You must be signed in to change notification settings - Fork 381
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
Build and cache relay list per configuration excluding Release #7797
base: main
Are you sure you want to change the base?
Build and cache relay list per configuration excluding Release #7797
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved
ios/relays-prebuild.sh
line 10 at r1 (raw file):
# Do not download the file for release builds, a different script will take care of that. if [ "$CONFIGURATION" == "Release" ]; then return 0
This is technically out of spec, but this script should fail loudly if there is no relay list exists at this point, IMO. Failing loudly would help us identify a case where we have forgotten to commit the relay list for a given release build :)
ios/relays-prebuild.sh
line 13 at r1 (raw file):
fi BACKUP_FILE="$CONFIGURATION_TEMP_DIR/relays.json"
Why not namespace it like $CONFIGURATION_TEMP_DIR/relays.json.$CONFIGURATION
? Then we're not overwriting the other file when switching between builds, this can help with the not that likely case of allowing builds to continue to work when offline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this implementation do what we want it to do?
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved
ios/relays-prebuild.sh
line 13 at r1 (raw file):
Previously, pinkisemils (Emīls Piņķis) wrote…
Why not namespace it like
$CONFIGURATION_TEMP_DIR/relays.json.$CONFIGURATION
? Then we're not overwriting the other file when switching between builds, this can help with the not that likely case of allowing builds to continue to work when offline.
Is this directory ever cleared? If not, after being built once the same file will be reused every time, which isn't what we want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! all files reviewed, all discussions resolved
ios/relays-prebuild.sh
line 13 at r1 (raw file):
Why not namespace it
As the name implies, $CONFIGURATION_TEMP_DIR is a temp directory specifically tied to the $CONFIGURATION
parameter, as such the whole folder is name spaced instead of the file itself.
Is this directory ever cleared?
Yes, when you issue a clean command to Xcode
We get to control exactly when we want a fresh file.
efe1ffd
to
377d95c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @pinkisemils and @rablador)
ios/relays-prebuild.sh
line 10 at r1 (raw file):
Previously, pinkisemils (Emīls Piņķis) wrote…
This is technically out of spec, but this script should fail loudly if there is no relay list exists at this point, IMO. Failing loudly would help us identify a case where we have forgotten to commit the relay list for a given release build :)
I added that loud failure, but I didn't test it from the CLI. I couldn't see any echo
statements from within Xcode, so I'm hoping that running a build from the CLI (Which is what the CI is doing I assume) will display the error message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
N/m that, I forgot to remove comment.
Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @pinkisemils)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved
ios/relays-prebuild.sh
line 13 at r1 (raw file):
Previously, buggmagnet wrote…
Why not namespace it
As the name implies, $CONFIGURATION_TEMP_DIR is a temp directory specifically tied to the
$CONFIGURATION
parameter, as such the whole folder is name spaced instead of the file itself.Is this directory ever cleared?
Yes, when you issue a clean command to Xcode
We get to control exactly when we want a fresh file.
That's nice I think, although a little opaque to the user. Maybe we should add a line to the ReadMe to indicate this.
This PR changes the
relays-prebuild.sh
script to :relays.json
file to the correct configurationRelease
build.This change is