Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -331,23 +331,37 @@ jobs:
echo " Platform packages: 7"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"

- name: update Package.swift checksum and version
- name: update Package.swift and the package versions
if: steps.tag.outputs.version != ''
run: |
VERSION=${{ steps.tag.outputs.version }}

# The versions the steps above publish under are written into the working copy but were
# never committed, so the repository kept showing whatever it was last committed with:
# packages/node/package.json said 1.1.14 and the Flutter pubspec 1.2.3 while the
# extension was at 1.4.1. For the node package that was not only confusing, since its
# optionalDependencies pinned the seven platform packages to that old version too, so
# an npm install in packages/node fetched binaries from long before the current source.
# package.json was rewritten by the publish step above; the pubspec is rewritten by
# flutter-package.yml after the tag, so it is done here as well to commit it with the
# rest. Its sed there is then a no-op, and stays as the safety net it is.
sed -i "s/^version: .*/version: $VERSION/" packages/flutter/pubspec.yaml

ZIP="js-apple-xcframework-${VERSION}.zip"
if [ -f "$ZIP" ]; then
CHECKSUM=$(swift package compute-checksum "$ZIP")
URL="https://github.com/sqliteai/sqlite-js/releases/download/${VERSION}/${ZIP}"
sed -i "s|url: \".*apple-xcframework.*\"|url: \"${URL}\"|" Package.swift
sed -i "s|checksum: \".*\"|checksum: \"${CHECKSUM}\"|" Package.swift
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
git config --global user.name "$GITHUB_ACTOR"
git add Package.swift
git commit -m "Update Package.swift checksum for ${VERSION} [auto-update]" || true
git push origin main || true
fi

git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
git config --global user.name "$GITHUB_ACTOR"
git add Package.swift packages/node/package.json packages/flutter/pubspec.yaml
# [auto-update] keeps the build job from running again for this commit
git commit -m "Update Package.swift and the package versions for ${VERSION} [auto-update]" || true
git push origin main || true

- uses: softprops/action-gh-release@v2.2.1
if: steps.tag.outputs.version != ''
with:
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sqlite_js
version: 1.2.3
version: 1.4.2
description: >
SQLite JS is a powerful extension that brings JavaScript capabilities to SQLite.
With this extension, you can create custom SQLite functions, aggregates,
Expand Down
16 changes: 8 additions & 8 deletions packages/node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sqliteai/sqlite-js",
"version": "1.1.14",
"version": "1.4.2",
"description": "SQLite JS extension for Node.js - Custom SQLite functions in JavaScript",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down Expand Up @@ -53,13 +53,13 @@
"node": ">=16.0.0"
},
"optionalDependencies": {
"@sqliteai/sqlite-js-darwin-arm64": "1.1.14",
"@sqliteai/sqlite-js-darwin-x86_64": "1.1.14",
"@sqliteai/sqlite-js-linux-arm64": "1.1.14",
"@sqliteai/sqlite-js-linux-arm64-musl": "1.1.14",
"@sqliteai/sqlite-js-linux-x86_64": "1.1.14",
"@sqliteai/sqlite-js-linux-x86_64-musl": "1.1.14",
"@sqliteai/sqlite-js-win32-x86_64": "1.1.14"
"@sqliteai/sqlite-js-darwin-arm64": "1.4.2",
"@sqliteai/sqlite-js-darwin-x86_64": "1.4.2",
"@sqliteai/sqlite-js-linux-arm64": "1.4.2",
"@sqliteai/sqlite-js-linux-arm64-musl": "1.4.2",
"@sqliteai/sqlite-js-linux-x86_64": "1.4.2",
"@sqliteai/sqlite-js-linux-x86_64-musl": "1.4.2",
"@sqliteai/sqlite-js-win32-x86_64": "1.4.2"
},
"devDependencies": {
"@types/node": "^20.0.0",
Expand Down
Loading