Skip to content

Commit c66ab2a

Browse files
authored
feat: add sqlitestudio install package (#187)
Closes: #180
1 parent ffe2d3f commit c66ab2a

File tree

7 files changed

+142
-2
lines changed

7 files changed

+142
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# ![SQLiteStudio Logo](https://cdn.jsdelivr.net/gh/mikeee/ChocoPackages/icons/sqlite-studio.portable.png "SQLiteStudio Install Logo") [sqlite-studio.install](https://chocolatey.org/packages/sqlite-studio.portable)
2+
3+
Create, edit, browse SQLite databases.
4+
5+
**NOTE**: This is an automatically updated package. If you find it is out of date by more than a week, please contact the maintainer(s) and let them know the package is no longer updating correctly.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Read this before creating packages: https://chocolatey.org/docs/create-packages -->
3+
<!-- It is especially important to read the above link to understand additional requirements when publishing packages to the community feed aka dot org (https://chocolatey.org/packages). -->
4+
<!-- Test your packages in a test environment: https://github.com/chocolatey/chocolatey-test-environment -->
5+
<!--
6+
This is a nuspec. It mostly adheres to https://docs.nuget.org/create/Nuspec-Reference. Chocolatey uses a special version of NuGet.Core that allows us to do more than was initially possible. As such there are certain things to be aware of:
7+
* the package xmlns schema url may cause issues with nuget.exe
8+
* Any of the following elements can ONLY be used by choco tools - projectSourceUrl, docsUrl, mailingListUrl, bugTrackerUrl, packageSourceUrl, provides, conflicts, replaces
9+
* nuget.exe can still install packages with those elements but they are ignored. Any authoring tools or commands will error on those elements
10+
-->
11+
<!-- You can embed software files directly into packages, as long as you are not bound by distribution rights. -->
12+
<!-- * If you are an organization making private packages, you probably have no issues here -->
13+
<!-- * If you are releasing to the community feed, you need to consider distribution rights. -->
14+
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
15+
<metadata>
16+
<!-- == PACKAGE SPECIFIC SECTION == -->
17+
<!-- This section is about this package, although id and version have ties back to the software -->
18+
<!-- id is lowercase and if you want a good separator for words, use '-', not '.'. Dots are only acceptable as suffixes for certain types of packages, e.g. .install, .portable, .extension, .template -->
19+
<!-- If the software is cross-platform, attempt to use the same id as the debian/rpm package(s) if possible. -->
20+
<id>sqlite-studio.install</id>
21+
<!-- version should MATCH as closely as possible with the underlying software -->
22+
<!-- Is the version a prerelease of a version? https://docs.nuget.org/create/versioning#creating-prerelease-packages -->
23+
<!-- Note that unstable versions like 0.0.1 can be considered a released version, but it's possible that one can release a 0.0.1-beta before you release a 0.0.1 version. If the version number is final, that is considered a released version and not a prerelease. -->
24+
<version>0.0.0</version>
25+
<packageSourceUrl>https://github.com/mikeee/ChocoPackages/tree/master/automatic/sqlite-studio.install</packageSourceUrl>
26+
<!-- owners is a poor name for maintainers of the package. It sticks around by this name for compatibility reasons. It basically means you. -->
27+
<owners>mikeee</owners>
28+
<!-- ============================== -->
29+
<!-- == SOFTWARE SPECIFIC SECTION == -->
30+
<!-- This section is about the software itself -->
31+
<title>SQLiteStudio (Install)</title>
32+
<authors>pawelsalawa</authors>
33+
<!-- projectUrl is required for the community feed -->
34+
<projectUrl>https://sqlitestudio.pl/</projectUrl>
35+
<iconUrl>https://cdn.jsdelivr.net/gh/mikeee/ChocoPackages/icons/sqlite-studio.install.png</iconUrl>
36+
<copyright>Copyright (C) 2014 SalSoft</copyright>
37+
<!-- If there is a license Url available, it is is required for the community feed -->
38+
<licenseUrl>https://github.com/pawelsalawa/sqlitestudio/blob/914a612dcea79b72f4ce000d12ef60b1b840e9b9/SQLiteStudio3/coreSQLiteStudio/licenses/sqlitestudio_license.txt</licenseUrl>
39+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
40+
<projectSourceUrl>https://github.com/pawelsalawa/sqlitestudio</projectSourceUrl>
41+
<!--<docsUrl></docsUrl>-->
42+
<!--<mailingListUrl></mailingListUrl>-->
43+
<!--<bugTrackerUrl></bugTrackerUrl>-->
44+
<tags>sqlitestudio sqlite studio portable database manager</tags>
45+
<summary>Create, edit, browse SQLite databases.</summary>
46+
<description>Create, edit, browse SQLite databases.
47+
48+
**NOTE**: This is an automatically updated package. If you find it is out of date by more than a week, please contact the maintainer(s) and let them know the package is no longer updating correctly.
49+
</description>
50+
<!-- <releaseNotes></releaseNotes> -->
51+
<!-- =============================== -->
52+
<!-- Specifying dependencies and version ranges? https://docs.nuget.org/create/versioning#specifying-version-ranges-in-.nuspec-files -->
53+
<!-- <dependencies> -->
54+
<!-- <dependency id="autohotkey" /> -->
55+
<!-- <dependency id="" version="[__EXACT_VERSION__]" /> -->
56+
<!-- <dependency id="chocolatey" version="0.10.8" /> -->
57+
<!-- <dependency id="" version="[_MIN_VERSION_INCLUSIVE, MAX_VERSION_EXCLUSIVE)" /> -->
58+
<!-- <dependency id="" /> -->
59+
<!-- <dependency id="chocolatey-uninstall.extension" /> -->
60+
<!-- </dependencies> -->
61+
<!-- chocolatey-uninstall.extension - If supporting 0.9.9.x (or below) and including a chocolateyUninstall.ps1 file to uninstall an EXE/MSI, you probably want to include chocolatey-uninstall.extension as a dependency. Please verify whether you are using a helper function from that package. -->
62+
<!--<provides>NOT YET IMPLEMENTED</provides>-->
63+
<!--<conflicts>NOT YET IMPLEMENTED</conflicts>-->
64+
<!--<replaces>NOT YET IMPLEMENTED</replaces>-->
65+
</metadata>
66+
<files>
67+
<!-- this section controls what actually gets packaged into the Chocolatey package -->
68+
<file src="tools\**" target="tools" />
69+
<!--Building from Linux? You may need this instead: <file src="tools/**" target="tools" />-->
70+
</files>
71+
</package>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
$ErrorActionPreference = 'Stop';
2+
3+
$packageArgs = @{
4+
packageName = $env:ChocolateyPackageName
5+
url = ''
6+
url64 = ''
7+
checksum = ''
8+
checksumType = 'SHA256'
9+
checksum64 = ''
10+
checksumType64 = 'SHA256'
11+
fileType = 'EXE'
12+
silentArgs = '--mode unattended --install_for all'
13+
validExitCodes = @(0)
14+
}
15+
16+
Install-ChocolateyPackage @packageArgs
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#import-module au
2+
3+
. $PSScriptRoot\..\..\scripts\all.ps1
4+
5+
$releases = 'https://github.com/pawelsalawa/sqlitestudio/releases'
6+
7+
function global:au_SearchReplace {
8+
@{
9+
".\tools\chocolateyInstall.ps1" = @{
10+
'(^\s*url\s*=\s*)(''.*'')' = "`$1'$($Latest.URL32)'"
11+
"(?i)(^\s*checksum\s*=\s*)('.*')" = "`$1'$($Latest.Checksum32)'"
12+
"(?i)(^\s*checksumType\s*=\s*)('.*')" = "`$1'$($Latest.ChecksumType32)'"
13+
'(^\s*url64\s*=\s*)(''.*'')' = "`$1'$($Latest.URL64)'"
14+
"(?i)(^\s*checksum64\s*=\s*)('.*')" = "`$1'$($Latest.Checksum64)'"
15+
"(?i)(^\s*checksumType64\s*=\s*)('.*')" = "`$1'$($Latest.ChecksumType64)'"
16+
}
17+
}
18+
}
19+
20+
function global:au_BeforeUpdate {
21+
$Latest.Checksum32 = Get-RemoteChecksum $Latest.Url32
22+
$Latest.ChecksumType32 = 'SHA256'
23+
$Latest.Checksum64 = Get-RemoteChecksum $Latest.Url64
24+
$Latest.ChecksumType64 = 'SHA256'
25+
}
26+
27+
function global:au_AfterUpdate {
28+
Set-DescriptionFromReadme -SkipFirst 2
29+
}
30+
31+
function global:au_GetLatest {
32+
$page = Invoke-WebRequest -Uri $releases -UseBasicParsing
33+
$regexUrl = 'pawelsalawa\/sqlitestudio\/releases\/tag\/(?<version>[\d\.]+)'
34+
35+
$matched = $page.links | Where-Object href -match $regexUrl | Select-Object -First 1 -expand href
36+
37+
If ($False -ne $matched) {
38+
$ver = $matches.version
39+
}
40+
41+
return @{
42+
URL32 = "https://github.com/pawelsalawa/sqlitestudio/releases/download/$ver/sqlitestudio-$ver-windows-x86-installer.exe"
43+
URL64 = "https://github.com/pawelsalawa/sqlitestudio/releases/download/$ver/sqlitestudio-$ver-windows-x64-installer.exe"
44+
Version = $ver
45+
}
46+
}
47+
48+
update -ChecksumFor none

automatic/sqlitestudio/sqlitestudio.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ This is a nuspec. It mostly adheres to https://docs.nuget.org/create/Nuspec-Refe
5353
<dependencies>
5454
<!-- <dependency id="autohotkey" /> -->
5555
<!-- <dependency id="" version="[__EXACT_VERSION__]" /> -->
56-
<dependency id="sqlite-studio.portable" version="3.4.16" />
56+
<dependency id="sqlite-studio.install" version="3.4.16" />
5757
<!-- <dependency id="" version="[_MIN_VERSION_INCLUSIVE, MAX_VERSION_EXCLUSIVE)" /> -->
5858
<!-- <dependency id="" /> -->
5959
<!-- <dependency id="chocolatey-uninstall.extension" /> -->
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
#Install-VirtualPackage 'sqlite-studio.portable'
1+
#Install-VirtualPackage 'sqlite-studio.portable' 'sqlite-studio.install'

icons/sqlite-studio.install.png

9.95 KB
Loading

0 commit comments

Comments
 (0)