-
Notifications
You must be signed in to change notification settings - Fork 0
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
Get the create-report
async task in shape
#138
Changes from all commits
6eba0eb
f82cc85
72b2143
0c1b96b
69a9def
2352743
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,13 @@ | ||
BEGIN; | ||
|
||
-- There isn't a way to delete a value from an enum, so this is the workaround | ||
-- https://stackoverflow.com/a/56777227/17909149 | ||
DROP TYPE file_type; | ||
CREATE TYPE file_type AS ENUM ( | ||
'csv', | ||
'yaml', | ||
'zip', | ||
'html', | ||
'json'); | ||
|
||
COMMIT; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
BEGIN; | ||
|
||
ALTER TYPE file_type ADD VALUE 'txt'; | ||
ALTER TYPE file_type ADD VALUE 'css'; | ||
ALTER TYPE file_type ADD VALUE 'js'; | ||
ALTER TYPE file_type ADD VALUE 'ttf'; | ||
ALTER TYPE file_type ADD VALUE 'unknown'; | ||
|
||
COMMIT; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,13 +16,13 @@ export default defineNuxtPlugin((nuxtApp) => { | |
} | ||
} | ||
|
||
nuxtApp.vueApp.provide('handleMissingTranslation', handleMissingTranslation) | ||
const values = computed(() => { | ||
return missingTranslations.value | ||
}) | ||
return { | ||
provide: { | ||
missingTranslations: { | ||
handleMissingTranslation, | ||
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. Love this, great, elegant solution. |
||
values, | ||
numberMissing, | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -206,6 +206,13 @@ const ( | |
FileType_ZIP = "zip" | ||
FileType_HTML = "html" | ||
FileType_JSON = "json" | ||
|
||
// All for serving reports | ||
FileType_TEXT = "txt" | ||
FileType_CSS = "css" | ||
FileType_JS = "js" | ||
FileType_TTF = "ttf" | ||
FileType_UNKNOWN = "unknown" | ||
) | ||
|
||
var FileTypeValues = []FileType{ | ||
|
@@ -215,6 +222,11 @@ var FileTypeValues = []FileType{ | |
FileType_JSON, | ||
FileType_HTML, | ||
FileType_JSON, | ||
FileType_TEXT, | ||
FileType_CSS, | ||
FileType_JS, | ||
FileType_TTF, | ||
FileType_UNKNOWN, | ||
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. Nit: I don't think we want unknown in this list, since it's used to test things like convertibility to postgres, and we don't want "" to be persistable. 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. ^^ discussed above |
||
} | ||
|
||
func ParseFileType(s string) (FileType, error) { | ||
|
@@ -233,6 +245,16 @@ func ParseFileType(s string) (FileType, error) { | |
return FileType_HTML, nil | ||
case "json": | ||
return FileType_JSON, nil | ||
case "txt": | ||
return FileType_TEXT, nil | ||
case "css": | ||
return FileType_CSS, nil | ||
case "js": | ||
return FileType_JS, nil | ||
case "ttf": | ||
return FileType_TTF, nil | ||
case "unknown": | ||
return FileType_UNKNOWN, nil | ||
} | ||
return "", fmt.Errorf("unknown pacta.FileType: %q", s) | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
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 LOVE THIS IT WILL MAKE LIFE EASIER THANK YOU 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. HAPPY TO HELP YEAH I WASNT ENJOYING DOING THIS MANUALLY EITHER |
||
|
||
ROOT="$BUILD_WORKSPACE_DIRECTORY" | ||
cd "$ROOT" | ||
|
||
# Build the image | ||
bazel build --@io_bazel_rules_go//go/config:pure //cmd/runner:image_tarball | ||
|
||
# Load it into Docker, capture output | ||
LOAD_OUTPUT=$(docker load < bazel-bin/cmd/runner/image_tarball/tarball.tar) | ||
|
||
# Extract the SHA | ||
IMAGE_ID=$(echo $LOAD_OUTPUT | grep -oP 'sha256:\K\w+') | ||
|
||
# Tag the image | ||
docker tag $IMAGE_ID rmisa.azurecr.io/runner:latest | ||
|
||
echo "Tagged $IMAGE_ID as rmisa.azurecr.io/runner:latest" | ||
|
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.
mnt?
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.
https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/mnt.html
Basically,
/mnt
is a generic place for external things being mounted in. It's a convention Alex used in the stub repo, and it makes as much sense as any other location.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.
👍