-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Create separate automodel pack #13879
Changes from 3 commits
e2abd3f
e7ca233
3ef82c1
0d78eeb
8d34ab6
3918e57
56871c7
1b31c4d
480e3bf
3aeacf6
3b8b33a
361ae17
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 | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,28 @@ | ||||||
#!/bin/sh | ||||||
set -e | ||||||
|
||||||
AUTOMODEL_ROOT="$(dirname $0)" | ||||||
WORKSPACE_ROOT="$AUTOMODEL_ROOT/../../../.." | ||||||
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
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 have always been using 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'm not sure. I've usually just used |
||||||
GRPS="automodel,-test" | ||||||
|
||||||
if [ -z "$CODEQL_DIST" ]; then | ||||||
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. (Optional)...you could also check if 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. Lets defer that in case we want to make changes to the solorigate pack as well. |
||||||
echo "CODEQL_DIST not set" | ||||||
exit -1 | ||||||
fi | ||||||
|
||||||
cd "$AUTOMODEL_ROOT" | ||||||
echo Testing automodel queries | ||||||
"${CODEQL_DIST}/codeql" test run test | ||||||
|
||||||
cd "$WORKSPACE_ROOT" | ||||||
|
||||||
echo Preparing release | ||||||
"${CODEQL_DIST}/codeql" pack release --groups $GRPS | ||||||
|
||||||
echo Publishing automodel | ||||||
"${CODEQL_DIST}/codeql" pack publish --groups $GRPS | ||||||
|
||||||
echo Bumping versions | ||||||
"${CODEQL_DIST}/codeql" pack post-release --groups $GRPS | ||||||
|
||||||
echo Automodel packs successfully published. Please commit and push the version changes. | ||||||
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. If you wanted to be extra fancy, you could commit and push directly from this script. 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. Hmm... I kind of like it not committing for me, then there is less that suddenly happens. But we can also tweak this afterwards. It almost seems like there should be a generic publish script we could have for all the separate packs, but I am not sure how frequent these separate packs are? 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. If this script is going to be run in CI, then something will have to commit and push the change, but maybe that is a longer term goal. Eventually, all of our core packs will be publishable separately. But, that won't happen for a while. I still would hope that something like this script would become the default way of publishing. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: codeql/java-automodel-queries | ||
version: 0.0.1-dev | ||
groups: | ||
- java | ||
- automodel | ||
dependencies: | ||
codeql/java-all: ${workspace} | ||
warnOnImplicitThis: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: codeql/java-automodel-tests | ||
version: 0.0.1-dev | ||
groups: | ||
- java | ||
- automodel | ||
- test | ||
dependencies: | ||
codeql/java-all: ${workspace} | ||
codeql/java-automodel-queries: ${workspace} | ||
extractor: java | ||
tests: . | ||
warnOnImplicitThis: true |
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.
I know that the original script has this same line (which I wrote a couple of years ago), but not sure if it's the best. This script is only running successfully from the
codeql/java/ql/automodel
directory. Running in the repo root is failing for some reason.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.
Ah...I think the path in line 5 needs to be normalized. Running from the repo root will make
WORKSPACE_ROOT=java/ql/automodel/../../..
, but it really needs to beWORKSPACE_ROOT=.
.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.
I have changed this to do:
Happy to switch to
realpath
as well if that is better.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.
Also updated the solorigate script with this change.