System.Data.SQLite
Check-in [a2473ecc36]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Improve robustness of the download page update script.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a2473ecc36ef54bb375157ddeb38ee8d895b1124
User & Date: mistachkin 2015-07-30 17:59:34
Context
2015-07-30
18:13
Further improvements to the download page update script. check-in: 872bd8c9ee user: mistachkin tags: trunk
18:00
Merge updates from trunk. check-in: 5c62d58e23 user: mistachkin tags: preRelease
17:59
Improve robustness of the download page update script. check-in: a2473ecc36 user: mistachkin tags: trunk
16:27
Update some incorect SHA1 hashes on the download page. check-in: 36e46ec005 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to Setup/updateFileInfo.tcl.

79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101



102
103
104
105
106
107
108
...
175
176
177
178
179
180
181

























182
183
184
185
186
187
188
189
190

if {![info exists outputDirectory] || \
    [string length $outputDirectory] == 0} then {
  set outputDirectory [file join $path Output]
}

#
# NOTE: Setup the regular expression pattern with the necessary captures.  This
#       pattern is mostly non-greedy; however, at the end we need to match
#       exactly 40 hexadecimal characters.  In theory, in Tcl, this could have
#       an undefined result due to the mixing of greedy and non-greedy
#       quantifiers; however, in practice, this seems to work properly.  Also,
#       this pattern assumes a particular structure for the [HTML] file to be
#       updated.
#
set pattern1 {<a\
    href=".*?/(.*?\.(?:exe|zip|nupkg))">.*?\((\d+?\.\d+?) MiB\).*?sha1:\
    ([0-9A-F]{40})}

set pattern2 {<a\
    href=".*?/package/.*?/\d+\.\d+\.\d+\.\d+">(.*?)</a>.*?\((\d+?\.\d+?)\
    MiB\).*?sha1: ([0-9A-F]{40})}




#
# NOTE: Grab all the data from the file to be updated.
#
set data [readFile $updateFileName]

#
# NOTE: Initialize the total number of changes made to zero.
................................................................................
      incr count [regsub -nocase -start $start -- "***=$fileHash" $data \
          $newFileHash data]

      incr start [string length $fileHash]
    }
  }
}


























#
# NOTE: Write the [modified] data to the file to be updated.
#
if {$count > 0} then {
  writeFile $updateFileName $data
} else {
  puts stdout "WARNING: No changes, update of \"$updateFileName\" skipped."
}







|
|
|
|












>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>









79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
...
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218

if {![info exists outputDirectory] || \
    [string length $outputDirectory] == 0} then {
  set outputDirectory [file join $path Output]
}

#
# NOTE: Setup the regular expression patterns with the necessary captures.
#       These patterns are mostly non-greedy; however, at the end we need to
#       match exactly 40 hexadecimal characters.  In theory, in Tcl, this could
#       have an undefined result due to the mixing of greedy and non-greedy
#       quantifiers; however, in practice, this seems to work properly.  Also,
#       this pattern assumes a particular structure for the [HTML] file to be
#       updated.
#
set pattern1 {<a\
    href=".*?/(.*?\.(?:exe|zip|nupkg))">.*?\((\d+?\.\d+?) MiB\).*?sha1:\
    ([0-9A-F]{40})}

set pattern2 {<a\
    href=".*?/package/.*?/\d+\.\d+\.\d+\.\d+">(.*?)</a>.*?\((\d+?\.\d+?)\
    MiB\).*?sha1: ([0-9A-F]{40})}

set pattern3 {href="/downloads/(.*?)"}
set pattern4 {\(sha1: ([0-9A-F]{40})\)}

#
# NOTE: Grab all the data from the file to be updated.
#
set data [readFile $updateFileName]

#
# NOTE: Initialize the total number of changes made to zero.
................................................................................
      incr count [regsub -nocase -start $start -- "***=$fileHash" $data \
          $newFileHash data]

      incr start [string length $fileHash]
    }
  }
}

#
# NOTE: Attempt to verify that each file name now has the correct SHA1 hash
#       associated with it on the page.
#
foreach {dummy3 fileName} [regexp -all -inline -nocase -- $pattern3 $data] \
        {dummy4 fileHash} [regexp -all -inline -nocase -- $pattern4 $data] {
  #
  # NOTE: Get the fully qualified file name based on the configured
  #       directory.
  #
  set fullFileName [file join $outputDirectory [file tail $fileName]]

  #
  # NOTE: Make sure the file hash from the [modified] data matches the
  #       calculated hash for the file.  If not, fail.
  #
  set fullFileHash [getFileHash $fullFileName]

  if {$fileHash ne $fullFileHash} then {
    puts stdout "ERROR: SHA1 hash mismatch for\
        file \"$fullFileName\", have \"$fileHash\" (from data),\
        need \"$fullFileHash\" (calculated)."
  }
}

#
# NOTE: Write the [modified] data to the file to be updated.
#
if {$count > 0} then {
  writeFile $updateFileName $data
} else {
  puts stdout "WARNING: No changes, update of \"$updateFileName\" skipped."
}

Changes to www/downloads.wiki.

479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
...
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
...
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
...
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
...
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
....
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
....
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
        required.
        <br />
        <big><b>This is the only setup package that is capable of installing the
        design-time components for Visual Studio 2005.
        <br />
        <br />
        However, if you do not require the design-time components, please
        consider downloading the associated
        <a href="/downloads/1.0.97.0/sqlite-netFx20-binary-bundle-Win32-2005-1.0.97.0.zip">Precompiled Binaries</a>
        instead.</b></big>
        <br />
        <br />
        (sha1: daa0f42621b93769755fb7a6546eddd3d56b8e72)
      </td>
    </tr>

................................................................................
        required.
        <br />
        <big><b>This is the only setup package that is capable of installing the
        design-time components for Visual Studio 2008.
        <br />
        <br />
        However, if you do not require the design-time components, please
        consider downloading the associated
        <a href="/downloads/1.0.97.0/sqlite-netFx35-binary-bundle-Win32-2008-1.0.97.0.zip">Precompiled Binaries</a>
        instead.</b></big>
        <br />
        <br />
        (sha1: 03d86dba982e89dadfd19fc9bce775dcab040632)
      </td>
    </tr>

................................................................................
        SP1 runtime for x86 is included.  The .NET Framework 4.0 is required.
        <br />
        <big><b>This is the only setup package that is capable of installing the
        design-time components for Visual Studio 2010.
        <br />
        <br />
        However, if you do not require the design-time components, please
        consider downloading the associated
        <a href="/downloads/1.0.97.0/sqlite-netFx40-binary-bundle-Win32-2010-1.0.97.0.zip">Precompiled Binaries</a>
        instead.</b></big></b></big>
        <br />
        <br />
        (sha1: 182ae1db5c4747a4d24a8498a0c8ab14dfea3a55)
      </td>
    </tr>

    <tr>
................................................................................
        required.
        <br />
        <big><b>This is the only setup package that is capable of installing the
        design-time components for Visual Studio 2012.
        <br />
        <br />
        However, if you do not require the design-time components, please
        consider downloading the associated
        <a href="/downloads/1.0.97.0/sqlite-netFx45-binary-bundle-Win32-2012-1.0.97.0.zip">Precompiled Binaries</a>
        instead.
        <br />
        <br />
        Using Entity Framework 6 design-time support may require installing the
        Visual Studio 2012 &quot;flavor&quot; of the
        <a href="https://www.microsoft.com/en-us/download/details.aspx?id=40762">
        Entity Framework 6 Tools for Visual Studio 2012 &amp; 2013</a>.</b></big>
        <br />
        <br />
        (sha1: ff9df099dce5e3f0d478e33f587a2866cae9c8ab)
      </td>
    </tr>
................................................................................
        required.
        <br />
        <big><b>This is the only setup package that is capable of installing the
        design-time components for Visual Studio 2013.
        <br />
        <br />
        However, if you do not require the design-time components, please
        consider downloading the associated
        <a href="/downloads/1.0.97.0/sqlite-netFx451-binary-bundle-Win32-2013-1.0.97.0.zip">Precompiled Binaries</a>
        instead.
        <br />
        <br />
        Using Entity Framework 6 design-time support may require installing the
        Visual Studio 2013 &quot;flavor&quot; of the
        <a href="https://www.microsoft.com/en-us/download/details.aspx?id=40762">
        Entity Framework 6 Tools for Visual Studio 2012 &amp; 2013</a>.</b></big>
        <br />
        <br />
        (sha1: 15e31d48589c72d17e2269f72110c7e7a32cb6e3)
      </td>
    </tr>
................................................................................

    <tr>
      <td width="10">&nbsp;</td>
      <td width="30%" valign="top" align="right">
        <a name="sqlite-netFx45-binary-bundle-Win32-2012"></a>
        <a href="/downloads/1.0.97.0/sqlite-netFx45-binary-bundle-Win32-2012-1.0.97.0.zip">sqlite-netFx45-binary-bundle-Win32-2012-1.0.97.0.zip</a>
        <br />
        (2.09 MiB)
      </td>
      <td width="5"></td>
      <td valign="top">
        This binary package features the mixed-mode assembly and contains all
        the binaries for the x86 version of the System.Data.SQLite 1.0.97.0
        (3.8.10.2) package.  The Visual C++ 2012 Update 4 runtime for x86 and
        the .NET Framework 4.5 are required.
................................................................................

    <tr>
      <td width="10">&nbsp;</td>
      <td width="30%" valign="top" align="right">
        <a name="sqlite-netFx451-binary-bundle-Win32-2013"></a>
        <a href="/downloads/1.0.97.0/sqlite-netFx451-binary-bundle-Win32-2013-1.0.97.0.zip">sqlite-netFx451-binary-bundle-Win32-2013-1.0.97.0.zip</a>
        <br />
        (2.08 MiB)
      </td>
      <td width="5"></td>
      <td valign="top">
        This binary package features the mixed-mode assembly and contains all
        the binaries for the x86 version of the System.Data.SQLite 1.0.97.0
        (3.8.10.2) package.  The Visual C++ 2013 Update 2 runtime for x86 and the
        .NET Framework 4.5.1 are required.







|
<







 







|
<







 







|
<
|







 







|
<
|


|
|







 







|
<
|


|
|







 







|







 







|







479
480
481
482
483
484
485
486

487
488
489
490
491
492
493
...
578
579
580
581
582
583
584
585

586
587
588
589
590
591
592
...
676
677
678
679
680
681
682
683

684
685
686
687
688
689
690
691
...
774
775
776
777
778
779
780
781

782
783
784
785
786
787
788
789
790
791
792
793
...
879
880
881
882
883
884
885
886

887
888
889
890
891
892
893
894
895
896
897
898
....
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
....
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
        required.
        <br />
        <big><b>This is the only setup package that is capable of installing the
        design-time components for Visual Studio 2005.
        <br />
        <br />
        However, if you do not require the design-time components, please
        consider downloading the associated &quot;Precompiled Binaries&quot;

        instead.</b></big>
        <br />
        <br />
        (sha1: daa0f42621b93769755fb7a6546eddd3d56b8e72)
      </td>
    </tr>

................................................................................
        required.
        <br />
        <big><b>This is the only setup package that is capable of installing the
        design-time components for Visual Studio 2008.
        <br />
        <br />
        However, if you do not require the design-time components, please
        consider downloading the associated &quot;Precompiled Binaries&quot;

        instead.</b></big>
        <br />
        <br />
        (sha1: 03d86dba982e89dadfd19fc9bce775dcab040632)
      </td>
    </tr>

................................................................................
        SP1 runtime for x86 is included.  The .NET Framework 4.0 is required.
        <br />
        <big><b>This is the only setup package that is capable of installing the
        design-time components for Visual Studio 2010.
        <br />
        <br />
        However, if you do not require the design-time components, please
        consider downloading the associated &quot;Precompiled Binaries&quot;

        instead.</b></big>
        <br />
        <br />
        (sha1: 182ae1db5c4747a4d24a8498a0c8ab14dfea3a55)
      </td>
    </tr>

    <tr>
................................................................................
        required.
        <br />
        <big><b>This is the only setup package that is capable of installing the
        design-time components for Visual Studio 2012.
        <br />
        <br />
        However, if you do not require the design-time components, please
        consider downloading the associated &quot;Precompiled Binaries&quot;

        instead.</b></big>
        <br />
        <br />
        <big><b>Using Entity Framework 6 design-time support may require
        installing the Visual Studio 2012 &quot;flavor&quot; of the
        <a href="https://www.microsoft.com/en-us/download/details.aspx?id=40762">
        Entity Framework 6 Tools for Visual Studio 2012 &amp; 2013</a>.</b></big>
        <br />
        <br />
        (sha1: ff9df099dce5e3f0d478e33f587a2866cae9c8ab)
      </td>
    </tr>
................................................................................
        required.
        <br />
        <big><b>This is the only setup package that is capable of installing the
        design-time components for Visual Studio 2013.
        <br />
        <br />
        However, if you do not require the design-time components, please
        consider downloading the associated &quot;Precompiled Binaries&quot;

        instead.</b></big>
        <br />
        <br />
        <big><b>Using Entity Framework 6 design-time support may require
        installing the Visual Studio 2013 &quot;flavor&quot; of the
        <a href="https://www.microsoft.com/en-us/download/details.aspx?id=40762">
        Entity Framework 6 Tools for Visual Studio 2012 &amp; 2013</a>.</b></big>
        <br />
        <br />
        (sha1: 15e31d48589c72d17e2269f72110c7e7a32cb6e3)
      </td>
    </tr>
................................................................................

    <tr>
      <td width="10">&nbsp;</td>
      <td width="30%" valign="top" align="right">
        <a name="sqlite-netFx45-binary-bundle-Win32-2012"></a>
        <a href="/downloads/1.0.97.0/sqlite-netFx45-binary-bundle-Win32-2012-1.0.97.0.zip">sqlite-netFx45-binary-bundle-Win32-2012-1.0.97.0.zip</a>
        <br />
        (2.08 MiB)
      </td>
      <td width="5"></td>
      <td valign="top">
        This binary package features the mixed-mode assembly and contains all
        the binaries for the x86 version of the System.Data.SQLite 1.0.97.0
        (3.8.10.2) package.  The Visual C++ 2012 Update 4 runtime for x86 and
        the .NET Framework 4.5 are required.
................................................................................

    <tr>
      <td width="10">&nbsp;</td>
      <td width="30%" valign="top" align="right">
        <a name="sqlite-netFx451-binary-bundle-Win32-2013"></a>
        <a href="/downloads/1.0.97.0/sqlite-netFx451-binary-bundle-Win32-2013-1.0.97.0.zip">sqlite-netFx451-binary-bundle-Win32-2013-1.0.97.0.zip</a>
        <br />
        (2.09 MiB)
      </td>
      <td width="5"></td>
      <td valign="top">
        This binary package features the mixed-mode assembly and contains all
        the binaries for the x86 version of the System.Data.SQLite 1.0.97.0
        (3.8.10.2) package.  The Visual C++ 2013 Update 2 runtime for x86 and the
        .NET Framework 4.5.1 are required.