From b5b75b6354a0eb12f05fe4619b05398b64945818 Mon Sep 17 00:00:00 2001 From: Alex Rennie-Lis Date: Sun, 28 Jun 2026 23:09:59 +0100 Subject: [PATCH] Updated build script --- .gitignore | 23 +++++++++++++++++++++++ .npmrc | 1 + .prettierignore | 9 +++++++++ .prettierrc | 19 +++++++++++++++++++ .vscode/extensions.json | 7 +++++++ .vscode/settings.json | 5 +++++ build.sh | 22 ++++++++++++++++++++++ 7 files changed, 86 insertions(+) create mode 100644 .gitignore create mode 100644 .npmrc create mode 100644 .prettierignore create mode 100644 .prettierrc create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json create mode 100644 build.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3b462cb --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +node_modules + +# Output +.output +.vercel +.netlify +.wrangler +/.svelte-kit +/build + +# OS +.DS_Store +Thumbs.db + +# Env +.env +.env.* +!.env.example +!.env.test + +# Vite +vite.config.js.timestamp-* +vite.config.ts.timestamp-* diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..b6f27f1 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +engine-strict=true diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..7d74fe2 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,9 @@ +# Package Managers +package-lock.json +pnpm-lock.yaml +yarn.lock +bun.lock +bun.lockb + +# Miscellaneous +/static/ diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..6255599 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,19 @@ +{ + "useTabs": true, + "singleQuote": true, + "trailingComma": "none", + "printWidth": 100, + "plugins": [ + "prettier-plugin-svelte", + "prettier-plugin-tailwindcss" + ], + "tailwindStylesheet": "./src/routes/layout.css", + "overrides": [ + { + "files": "*.svelte", + "options": { + "parser": "svelte" + } + } + ] +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..cdab7df --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,7 @@ +{ + "recommendations": [ + "svelte.svelte-vscode", + "bradlc.vscode-tailwindcss", + "esbenp.prettier-vscode" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..bc31e15 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "*.css": "tailwindcss" + } +} diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..26535a5 --- /dev/null +++ b/build.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Exit immediately if any command exits with a non-zero status +set -e + +name="photogallery" +version="1.0-0" +registry="registry.unblue.uk" +image_name="${registry}/${name}" + +echo "🔨 Building Docker image for ${name}..." +# Build the image using the local Dockerfile context +docker build -t "${image_name}:${version}" -t "${image_name}:latest" . + +echo "🚀 Pushing tags to ${registry}..." +# Push the specific release version tag +docker push "${image_name}:${version}" + +# Push the latest tag +docker push "${image_name}:latest" + +echo "✅ Successfully built and pushed ${image_name}:${version} and :latest" \ No newline at end of file