Skip to content

Build your personal knowledge base with Trilium Notes

chore(web-clipper): remove leftover release scripts and build.ts

Elian Doran860d91518e90
diff --git a/apps/web-clipper/bin/release-chrome.sh b/apps/web-clipper/bin/release-chrome.sh
deleted file mode 100755
index 2b96c94197..0000000000
--- a/apps/web-clipper/bin/release-chrome.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env bash
-set -e
-
-VERSION=$(jq -r ".version" manifest.json)
-CHROME_EXTENSION_ID=dfhgmnfclbebfobmblelddiejjcijbjm
-
-BUILD_DIR=trilium-web-clipper-chrome
-
-rm -rf "dist/$BUILD_DIR"
-mkdir -p "dist/$BUILD_DIR"
-
-cp -r icons lib options popup *.js manifest.json "dist/$BUILD_DIR"
-
-cd dist/"${BUILD_DIR}" || exit
-
-jq '.name = "Trilium Web Clipper"' manifest.json | sponge manifest.json
-jq 'del(.browser_specific_settings)' manifest.json | sponge manifest.json
-
-EXT_FILE_NAME=trilium_web_clipper-${VERSION}-chrome.zip
-
-zip -r ../${EXT_FILE_NAME} *
-
-cd ..
-rm -r "${BUILD_DIR}"
-
-# https://github.com/fregante/chrome-webstore-upload-cli
-chrome-webstore-upload upload --source ${EXT_FILE_NAME} --auto-publish --extension-id "${CHROME_EXTENSION_ID}" --client-id "${CHROME_CLIENT_ID}" --client-secret "${CHROME_CLIENT_SECRET}" --refresh-token "${CHROME_REFRESH_TOKEN}"
-
diff --git a/apps/web-clipper/bin/release-firefox.sh b/apps/web-clipper/bin/release-firefox.sh
deleted file mode 100755
index 38633ac7a7..0000000000
--- a/apps/web-clipper/bin/release-firefox.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-set -e
-
-WEB_EXT_ID="{1410742d-b377-40e7-a9db-63dc9c6ec99c}"
-
-ARTIFACT_NAME=trilium-web-clipper-firefox
-BUILD_DIR=dist/$ARTIFACT_NAME
-
-rm -rf "$BUILD_DIR"
-mkdir -p "$BUILD_DIR"
-
-cp -r icons lib options popup *.js manifest.json "$BUILD_DIR"
-
-cd dist/"${ARTIFACT_NAME}" || exit
-
-jq '.name = "Trilium Web Clipper"' manifest.json | sponge manifest.json
-
-web-ext sign --api-key $FIREFOX_API_KEY --api-secret $FIREFOX_API_SECRET --artifacts-dir ../
-
-cd ..
-rm -r "${ARTIFACT_NAME}"
diff --git a/apps/web-clipper/bin/release.sh b/apps/web-clipper/bin/release.sh
deleted file mode 100755
index 69ba675e02..0000000000
--- a/apps/web-clipper/bin/release.sh
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/usr/bin/env bash
-set -e
-
-export GITHUB_REPO=trilium-web-clipper
-
-if [[ $# -eq 0 ]] ; then
- echo "Missing argument of new version"
- exit 1
-fi
-
-VERSION=$1
-
-if ! [[ ${VERSION} =~ ^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}(-.+)?$ ]] ;
-then
- echo "Version ${VERSION} isn't in format X.Y.Z"
- exit 1
-fi
-
-if ! git diff-index --quiet HEAD --; then
- echo "There are uncommitted changes"
- exit 1
-fi
-
-echo "Releasing Trilium Web Clipper $VERSION"
-
-jq '.version = "'"$VERSION"'"' manifest.json | sponge manifest.json
-
-git add manifest.json
-
-echo 'module.exports = { buildDate:"'$(date --iso-8601=seconds)'", buildRevision: "'$(git log -1 --format="%H")'" };' > build.js
-
-git add build.js
-
-TAG=v$VERSION
-
-echo "Committing package.json version change"
-
-git commit -m "release $VERSION"
-git push
-
-echo "Tagging commit with $TAG"
-
-git tag "$TAG"
-git push origin "$TAG"
-
-bin/release-firefox.sh
-bin/release-chrome.sh
-
-FIREFOX_BUILD=trilium_web_clipper-$VERSION-an+fx.xpi
-CHROME_BUILD=trilium_web_clipper-${VERSION}-chrome.zip
-
-echo "Creating release in GitHub"
-
-github-release release \
- --tag "$TAG" \
- --name "$TAG release"
-
-echo "Uploading firefox build package"
-
-github-release upload \
- --tag "$TAG" \
- --name "$FIREFOX_BUILD" \
- --file "dist/$FIREFOX_BUILD"
-
-echo "Uploading chrome build package"
-
-github-release upload \
- --tag "$TAG" \
- --name "$CHROME_BUILD" \
- --file "dist/$CHROME_BUILD"
-
-echo "Release finished!"
diff --git a/apps/web-clipper/build.ts b/apps/web-clipper/build.ts
deleted file mode 100644
index 2f5056d477..0000000000
--- a/apps/web-clipper/build.ts
+++ /dev/null
@@ -1 +0,0 @@
-export default { buildDate:"2022-10-29T15:25:37+02:00", buildRevision: "c9c10a90aa9b94efdf150b0b2fd57f9df5bf2d0a" };