From f2fb381964a77e751ff12d6c77650045137e1f06 Mon Sep 17 00:00:00 2001 From: fccview Date: Wed, 11 Feb 2026 18:48:51 +0000 Subject: [PATCH] create tarball for next release and fix few minor issues, also add download logs --- .github/FUNDING.yml | 1 + .github/workflows/docker-build.yml | 2 +- .github/workflows/docker-publish.yml | 2 +- .github/workflows/pr-checks.yml | 48 ++++++++++++++ .github/workflows/prebuild-release.yml | 60 ++++++++++++++++++ .../FeatureComponents/Layout/Sidebar.tsx | 2 +- .../FeatureComponents/Modals/LogsModal.tsx | 63 +++++++++++++++---- app/_translations/en.json | 1 + app/_translations/it.json | 1 + app/globals.css | 16 +++++ app/page.tsx | 4 +- package.json | 3 +- yarn.lock | 5 ++ 13 files changed, 190 insertions(+), 18 deletions(-) create mode 100644 .github/FUNDING.yml create mode 100644 .github/workflows/pr-checks.yml create mode 100644 .github/workflows/prebuild-release.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..e77bb4d --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: fccview \ No newline at end of file diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index bef6c5a..745c948 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -1,4 +1,4 @@ -name: Reusable Docker Build Logic +name: Builder on: workflow_call: diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 0d3b2d2..2cef228 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -1,4 +1,4 @@ -name: Build and Publish Multi-Platform Docker Image +name: Build and Publish on: push: diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml new file mode 100644 index 0000000..9bea502 --- /dev/null +++ b/.github/workflows/pr-checks.yml @@ -0,0 +1,48 @@ +name: PR Checks + +on: + pull_request: + branches: ["**"] + +jobs: + validate-branch: + name: Validate Target Branch + runs-on: ubuntu-latest + steps: + - name: YOU SHALL NOT PASS + if: github.base_ref == 'main' + run: | + if [ "${{ github.head_ref }}" != "develop" ]; then + echo "ERROR: Pull requests to 'main' are not allowed." + echo "Current source branch: ${{ github.head_ref }}" + echo "" + echo "Please create a PR to 'develop' first, this will become a release candidate when merged into 'main' by a maintainer" + exit 1 + fi + echo "Valid PR: develop → main" + + - name: PR info + run: | + echo "PR validation passed" + echo "Source: ${{ github.head_ref }}" + echo "Target: ${{ github.base_ref }}" + + typing: + name: Type and install checks + runs-on: ubuntu-latest + needs: validate-branch + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup the best engine ever + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: "yarn" + + - name: Install all dependencies + run: yarn install --frozen-lockfile + + - name: This will totally fail if you only use AI + run: yarn tsc --noEmit diff --git a/.github/workflows/prebuild-release.yml b/.github/workflows/prebuild-release.yml new file mode 100644 index 0000000..048ba73 --- /dev/null +++ b/.github/workflows/prebuild-release.yml @@ -0,0 +1,60 @@ +name: Build and Release Prebuilt Tarball + +on: + push: + tags: ["*"] + +jobs: + build-prebuild: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup the best engine ever + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'yarn' + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Bake cronmaster + env: + NODE_ENV: production + NEXT_TELEMETRY_DISABLED: 1 + run: yarn build + + - name: Get version from tag + id: version + run: | + VERSION="${GITHUB_REF#refs/tags/}" + echo "version=${VERSION}" >> $GITHUB_OUTPUT + + - name: Structure the prebuild stuff + run: | + mkdir -p prebuild-release/cronmaster/.next + cp -r .next/standalone/. prebuild-release/cronmaster/ + cp -r .next/static prebuild-release/cronmaster/.next/static + if [ -f .next/BUILD_ID ]; then + cp .next/BUILD_ID prebuild-release/cronmaster/.next/BUILD_ID + fi + cp -r public prebuild-release/cronmaster/public + cp -r howto prebuild-release/cronmaster/howto + + - name: Create tarball - tarball is a funny name + run: | + cd prebuild-release + tar -czf cronmaster_${{ steps.version.outputs.version }}_prebuild.tar.gz cronmaster + sha256sum cronmaster_${{ steps.version.outputs.version }}_prebuild.tar.gz > cronmaster_${{ steps.version.outputs.version }}_prebuild.tar.gz.sha256 + + - name: Attach to Release - pray it works + uses: softprops/action-gh-release@v1 + with: + files: | + prebuild-release/cronmaster_*_prebuild.tar.gz + prebuild-release/cronmaster_*_prebuild.tar.gz.sha256 + tag_name: ${{ steps.version.outputs.version }} diff --git a/app/_components/FeatureComponents/Layout/Sidebar.tsx b/app/_components/FeatureComponents/Layout/Sidebar.tsx index 994e51c..7bdb466 100644 --- a/app/_components/FeatureComponents/Layout/Sidebar.tsx +++ b/app/_components/FeatureComponents/Layout/Sidebar.tsx @@ -92,7 +92,7 @@ export const Sidebar = forwardRef( > {logs.length > 0 && ( )} -
-
+
+

{t("cronjobs.logFiles")}

{isLoadingLogs ? ( @@ -288,8 +325,8 @@ export const LogsModal = ({
diff --git a/app/_translations/en.json b/app/_translations/en.json index dfbd431..44fe011 100644 --- a/app/_translations/en.json +++ b/app/_translations/en.json @@ -47,6 +47,7 @@ "logs": "logs", "logFiles": "Log Files", "logContent": "Log Content", + "downloadLog": "Download", "selectLogToView": "Select a log file to view its content", "noLogsFound": "No logs found for this job", "confirmDeleteLog": "Are you sure you want to delete this log file?", diff --git a/app/_translations/it.json b/app/_translations/it.json index 6c2ef0e..5349142 100644 --- a/app/_translations/it.json +++ b/app/_translations/it.json @@ -46,6 +46,7 @@ "logs": "log", "logFiles": "File", "logContent": "Contenuto Log", + "downloadLog": "Scarica", "selectLogToView": "Seleziona un file per visualizzarne il contenuto", "noLogsFound": "Nessun log trovato per questa operazione", "confirmDeleteLog": "Sei sicuro di voler eliminare questo file?", diff --git a/app/globals.css b/app/globals.css index a981cdc..d9027e3 100644 --- a/app/globals.css +++ b/app/globals.css @@ -260,4 +260,20 @@ pre::-webkit-scrollbar { max-width: 100%; margin: inherit; } +} + +.sidebar-shrinker { + z-index: 1; +} + +.sidebar-shrinker:before { + content: ''; + width: 0; + height: 0; + border-top: 6px solid var(--box-border-color, var(--foreground2)); + border-right: 12px solid transparent; + position: absolute; + right: -1px; + bottom: -6px; + z-index: -1; } \ No newline at end of file diff --git a/app/page.tsx b/app/page.tsx index f61d339..a448f89 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -81,7 +81,9 @@ export default async function Home() { Cr*nMaster

- {t("common.version").replace("{version}", version)} + + {t("common.version").replace("{version}", version)} +

diff --git a/package.json b/package.json index ba2bb40..6f7a3b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cronjob-manager", - "version": "2.0.0", + "version": "2.0.1", "private": true, "scripts": { "dev": "next dev", @@ -34,6 +34,7 @@ "codemirror": "^6.0.2", "cron-parser": "^5.3.0", "cronstrue": "^3.2.0", + "fflate": "^0.8.2", "jose": "^6.1.1", "minimatch": "^10.0.3", "next": "14.2.35", diff --git a/yarn.lock b/yarn.lock index 5065849..fa08cf0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2842,6 +2842,11 @@ fdir@^6.5.0: resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.5.0.tgz#ed2ab967a331ade62f18d077dae192684d50d350" integrity sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg== +fflate@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.8.2.tgz#fc8631f5347812ad6028bbe4a2308b2792aa1dea" + integrity sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A== + file-entry-cache@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027"