-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from tutao/better-sqlcipher-new
update Better sqlcipher
- Loading branch information
Showing
40 changed files
with
2,120 additions
and
469 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
* @JoshuaWise | ||
/.github/workflows/build.yml @JoshuaWise @mceachen | ||
/package.json @JoshuaWise @WiseLibs/better-sqlite3-team | ||
/docs/compilation.md @JoshuaWise @WiseLibs/better-sqlite3-team | ||
/docs/performance.md @JoshuaWise @WiseLibs/better-sqlite3-team | ||
/docs/troubleshooting.md @JoshuaWise @WiseLibs/better-sqlite3-team | ||
/deps/sqlite3/sqlite3.c @JoshuaWise @WiseLibs/better-sqlite3-team | ||
/deps/sqlite3/sqlite3.h @JoshuaWise @WiseLibs/better-sqlite3-team | ||
/deps/sqlite3/sqlite3ext.h @JoshuaWise @WiseLibs/better-sqlite3-team | ||
/.github/workflows/build.yml @JoshuaWise @WiseLibs/better-sqlite3-team |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: bump-version | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
type: | ||
type: choice | ||
description: Type of version bump | ||
required: true | ||
options: | ||
- patch | ||
- minor | ||
- major | ||
|
||
jobs: | ||
bump: | ||
name: Bump to a new version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
- name: Configure user | ||
run: | | ||
git config --local user.name "${{ github.actor }}" | ||
git config --local user.email "${{ github.actor }}@users.noreply.github.com" | ||
- name: Bump the version | ||
run: npm version ${{ github.event.inputs.type }} | ||
- name: Push commit | ||
run: git push origin master:master | ||
- name: Push tag | ||
run: git push origin --tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: update-sqlite | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
year: | ||
description: SQLite release year | ||
required: true | ||
version: | ||
description: SQLite version (encoded) | ||
required: true | ||
|
||
jobs: | ||
download-and-update: | ||
name: Download and update SQLite | ||
runs-on: ubuntu-latest | ||
env: | ||
ENV_YEAR: ${{ github.event.inputs.year }} | ||
ENV_VERSION: ${{ github.event.inputs.version }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
- name: Create new update branch | ||
run: git checkout -b sqlite-update-${{ env.ENV_VERSION }} | ||
- name: Update download script | ||
run: | | ||
sed -Ei "s/YEAR=\"[0-9]+\"/YEAR=\"${{ env.ENV_YEAR }}\"/g" ./deps/download.sh | ||
sed -Ei "s/VERSION=\"[0-9]+\"/VERSION=\"${{ env.ENV_VERSION }}\"/g" ./deps/download.sh | ||
echo "ENV_TRUE_VERSION=$((10#${ENV_VERSION:0:1})).$((10#${ENV_VERSION:1:2})).$((10#${ENV_VERSION:3:2}))" >> $GITHUB_ENV | ||
- name: Download, compile and package SQLite | ||
run: npm run download | ||
- name: Push update branch | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Update SQLite to version ${{ env.ENV_TRUE_VERSION }} | ||
branch: sqlite-update-${{ env.ENV_VERSION }} | ||
- name: Create new PR | ||
uses: repo-sync/pull-request@v2 | ||
with: | ||
github_token: ${{ secrets.PAT }} | ||
source_branch: sqlite-update-${{ env.ENV_VERSION }} | ||
pr_title: Update SQLite to version ${{ env.ENV_TRUE_VERSION }} | ||
pr_body: This is an automated pull request, updating SQLite to version \`${{ env.ENV_TRUE_VERSION }}\`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,4 +40,9 @@ lib/binding | |
temp/ | ||
TODO | ||
.local | ||
|
||
# Downloaded artifact | ||
deps/unverified.tmp | ||
# deps/sqlcipher.tar.gz | ||
|
||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Acknowledgments | ||
|
||
## @types/better-sqlite3 | ||
|
||
MIT License | ||
|
||
Copyright (c) Microsoft Corporation. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
'use strict'; | ||
const path = require('path'); | ||
const fs = require('fs'); | ||
|
||
const dest = process.argv[2]; | ||
const source = path.resolve(path.sep, process.argv[3] || path.join(__dirname, 'sqlite3')); | ||
const files = [ | ||
{ filename: 'sqlite3.c', optional: false }, | ||
{ filename: 'sqlite3.h', optional: false }, | ||
]; | ||
|
||
if (process.argv[3]) { | ||
// Support "_HAVE_SQLITE_CONFIG_H" in custom builds. | ||
files.push({ filename: 'config.h', optional: true }); | ||
} else { | ||
// Required for some tests. | ||
files.push({ filename: 'sqlite3ext.h', optional: false }); | ||
} | ||
|
||
for (const { filename, optional } of files) { | ||
if (optional && !fs.existsSync(path.join(source, filename))) { | ||
continue; | ||
} | ||
fs.accessSync(path.join(source, filename)); | ||
fs.copyFileSync(path.join(source, filename), path.join(dest, filename)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.