-
Notifications
You must be signed in to change notification settings - Fork 204
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
test release rotation: factor out selection #11161
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -150,7 +150,13 @@ steps: | |||||
echo "##vso[task.setvariable variable=$1;isOutput=true]$2" | ||||||
} | ||||||
next_in_rotation() { | ||||||
awk '/^[^#]/ {print $1}' "$PROJ_DIR/release/rotation" | head -n 1 | ||||||
awk '/^[^#]/ {print $0}' "$PROJ_DIR/release/rotation" | head -n 1 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
No need to do this, it's just for you to know in case you didn't, a pattern with no corresponding action in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did not know that. Thanks! |
||||||
} | ||||||
next_in_rotation_slack() { | ||||||
next_in_rotation | awk '{print $1}' | ||||||
} | ||||||
next_in_rotation_github() { | ||||||
next_in_rotation | awk '{print $2}' | ||||||
} | ||||||
|
||||||
END | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,7 +92,7 @@ jobs: | |
tmp=$(mktemp) | ||
next=$(next_in_rotation) | ||
grep -v "$next" release/rotation > $tmp | ||
grep "$next" release/rotation >> $tmp | ||
echo "$next" >> $tmp | ||
mv $tmp release/rotation | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isolates the knowledge of comment format to the |
||
} | ||
release_message() { | ||
|
@@ -121,8 +121,8 @@ jobs: | |
|
||
reset | ||
|
||
NEXT_SLACK=$(next_in_rotation) | ||
NEXT_GH=$(grep "$NEXT_SLACK" release/rotation | awk '{print $2}') | ||
NEXT_SLACK=$(next_in_rotation_slack) | ||
NEXT_GH=$(next_in_rotation_github) | ||
|
||
PREV="v$(head -1 LATEST | awk '{print $2}')" | ||
./release.sh new snapshot | ||
|
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.
If you choose to have a second function to select the GitHub handle,
next_in_rotation_slack
andnext_in_rotation_github
could be two viable names to avoid confusion.