Merged
Conversation
p-ferreira
approved these changes
Jun 13, 2023
Eugene-hu
reviewed
Jun 13, 2023
| autoRunLoc=$(readlink -f "$0") | ||
| proc_name="auto_run_validator" | ||
| args=() | ||
| version_location="./openvalidators/__init__.py" |
Contributor
There was a problem hiding this comment.
Will this direct path create issues when running the script? the script can only be run when you are in the same directory right?
Contributor
Author
There was a problem hiding this comment.
Yes, it should really only be run when you are in the root directory of the repository.
scripts/autorun.sh
Outdated
| if [ -d "./.git" ]; then | ||
|
|
||
| # check value on github remotely | ||
| latest_version=$(check_variable_value_on_github "opentensor/tag_trial_repo_delete_later" "openvalidators/__init__.py" "__version__ ") |
Contributor
There was a problem hiding this comment.
does the opentensor/tag_trial_repo_delete_later need to be changed?
Contributor
Author
There was a problem hiding this comment.
Fixed. This was for testing.
cc4ca33 to
29f869b
Compare
eduardogr
reviewed
Jun 13, 2023
scripts/run.sh
Outdated
Comment on lines
+23
to
+36
| versionLessThanOrEqual() { | ||
| [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ] | ||
| } | ||
|
|
||
| # Checks if $1 is smaller than $2 | ||
| # If $1 is smaller than $2, then true. | ||
| # else false. | ||
| versionLessThan() { | ||
| [ "$1" = "$2" ] && return 1 || versionLessThanOrEqual $1 $2 | ||
| } | ||
|
|
||
| # Returns the difference between | ||
| # two versions as a numerical value. | ||
| get_version_difference() { |
There was a problem hiding this comment.
I think we should consistently name functions here
i think bash scripts are expected to have snake cases naming,
what do you think about that?
Reviewer comments
db82c86 to
501d465
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds an auto-update script that checks the
__version__inopenvalidators/__init__.pyand pulls changes if the change diff to the next version is == 1.This will allow us to push experimental changes, and only trigger the change if we update the spec version, which will push up changes to everyone running a validator.