From 726b46aa81411abd1fe39deef7d7603fa445e749 Mon Sep 17 00:00:00 2001 From: Carl Westman Date: Wed, 12 Mar 2025 11:57:03 +0100 Subject: [PATCH 1/4] Update button text from "How to Upload" to only "How to", there is much more info in there --- byteguide/templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/byteguide/templates/base.html b/byteguide/templates/base.html index 7347421..df2a6e4 100644 --- a/byteguide/templates/base.html +++ b/byteguide/templates/base.html @@ -51,7 +51,7 @@ role="button" href="/faq" title="Answers to some of common questions..." - style="background-color: hsl(36,100%,50%)">How to Upload + style="background-color: hsl(36,100%,50%)">How to {% endif %} From cd21785d2231063d35e231b7fd1700b9a52bea9f Mon Sep 17 00:00:00 2001 From: Carl Westman Date: Wed, 12 Mar 2025 11:58:59 +0100 Subject: [PATCH 2/4] Added required fnutts i.e. " to params in curl command for deletion --- byteguide/templates/faq.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/byteguide/templates/faq.html b/byteguide/templates/faq.html index cef7aa2..26bdb6a 100644 --- a/byteguide/templates/faq.html +++ b/byteguide/templates/faq.html @@ -131,7 +131,7 @@
Delete a version
             # Install Azure CLI to get access token, https://learn.microsoft.com/en-us/cli/azure/install-azure-cli
             $ ACCESS_TOKEN=$(az account get-access-token --scope a325c352-74f8-48eb-9ca2-3e92712b0fb4/user_impersonation --query accessToken -o tsv)
-            $ curl -X POST -F project=your-project -F version=your-version -F unique-key=your-unique-key -H "Authorization: Bearer $ACCESS_TOKEN" https://docshost.dev.ctek.com/manage/delete
+            $ curl -X POST -F "project=your-project" -F "version=your-version" -F "unique-key=your-unique-key" -H "Authorization: Bearer $ACCESS_TOKEN" https://docshost.dev.ctek.com/manage/delete
             
📢Note: You can also delete ALL versions of a project by passing "version=all" to the above curl command. @@ -149,7 +149,7 @@
Delete a project
             # Install Azure CLI to get access token, https://learn.microsoft.com/en-us/cli/azure/install-azure-cli
             $ ACCESS_TOKEN=$(az account get-access-token --scope a325c352-74f8-48eb-9ca2-3e92712b0fb4/user_impersonation --query accessToken -o tsv)
-            $ curl -X POST -F project=your-project -F unique-key=your-unique-key -H "Authorization: Bearer $ACCESS_TOKEN" https://docshost.dev.ctek.com/manage/delete
+            $ curl -X POST -F "project=your-project" -F "unique-key=your-unique-key" -H "Authorization: Bearer $ACCESS_TOKEN" https://docshost.dev.ctek.com/manage/delete
             
📢Note: You can only delete a project if there are no versions left for that project, use "version=all" from above for a swift kill. From e0c3d4396a44d140070c99df4862b31abca0c182 Mon Sep 17 00:00:00 2001 From: Carl Westman Date: Wed, 12 Mar 2025 12:03:48 +0100 Subject: [PATCH 3/4] Upgrade cache action from v2 to v4 in lint-and-format workflow --- .github/workflows/lint-and-format.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint-and-format.yml b/.github/workflows/lint-and-format.yml index 7f9d0d0..7044590 100644 --- a/.github/workflows/lint-and-format.yml +++ b/.github/workflows/lint-and-format.yml @@ -21,7 +21,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Cache poetry install - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.local key: poetry-${{ env.POETRY_VERSION }} @@ -35,7 +35,7 @@ jobs: - name: Cache deps id: cache-deps - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: .venv key: pydeps-${{ hashFiles('**/poetry.lock') }} From 2739ba1ac167be5bd90fab33f916769db1056492 Mon Sep 17 00:00:00 2001 From: Carl Westman Date: Wed, 12 Mar 2025 15:21:49 +0100 Subject: [PATCH 4/4] Fix curl command syntax in FAQ for improved clarity and correctness --- byteguide/templates/faq.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/byteguide/templates/faq.html b/byteguide/templates/faq.html index 26bdb6a..f77a73e 100644 --- a/byteguide/templates/faq.html +++ b/byteguide/templates/faq.html @@ -230,7 +230,7 @@

FAQ

if you want to upload a version from your main/master/dev branch such as in the example below:
                   ACCESS_TOKEN=$(az account get-access-token --scope a325c352-74f8-48eb-9ca2-3e92712b0fb4/user_impersonation --query accessToken -o tsv)
-                  curl -X POST -F file=@tests/static/test_docs/Sample-Proj-main.zip -F unique-key=743b92dc-ee45-4671-966a-0e8fa5def464 https://docshost.dev.ctek.com/manage/upload -H "Authorization: Bearer $ACCESS_TOKEN"
+                  curl -X POST -F "file=@tests/static/test_docs/Sample-Proj-main.zip" -F "unique-key=743b92dc-ee45-4671-966a-0e8fa5def464" -H "Authorization: Bearer $ACCESS_TOKEN" https://docshost.dev.ctek.com/manage/upload
                 
The only requirement is that the version number is unique to your project and alphanumeric.

@@ -243,7 +243,7 @@

FAQ

For this you can use the `reupload` flag as in the following example:
                   ACCESS_TOKEN=$(az account get-access-token --scope a325c352-74f8-48eb-9ca2-3e92712b0fb4/user_impersonation --query accessToken -o tsv)
-                  curl -X POST -F file=@tests/static/test_docs/Sample-Proj-main.zip -F unique-key=743b92dc-ee45-4671-966a-0e8fa5def464 -F reupload=true https://docshost.dev.ctek.com/manage/upload -H "Authorization: Bearer $ACCESS_TOKEN"
+                  curl -X POST -F "file=@tests/static/test_docs/Sample-Proj-main.zip" -F "unique-key=743b92dc-ee45-4671-966a-0e8fa5def464" -F "reupload=true https://docshost.dev.ctek.com/manage/upload" -H "Authorization: Bearer $ACCESS_TOKEN"
                 
Again an example of this would be if you want to upload a version from your main/master/dev branch again and again.

@@ -272,7 +272,7 @@

FAQ

so the final curl command should something like this:
-                  curl -X POST -d @register.json -H 'Content-Type: application/json' https://docshost.dev.ctek.com/manage/register -H "Authorization: Bearer $(ACCESS_TOKEN)"
+                  curl -X POST -d @register.json -H "Content-Type: application/json" -H "Authorization: Bearer $(ACCESS_TOKEN)" https://docshost.dev.ctek.com/manage/register