Overview
Comment: | Comments, cleanup, more work in progress on the uploader client. Not yet tested. Also, 'getContainingDirectory' still needs work to forbid mismatched root directories. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | uploaderClient |
Files: | files | file ages | folders |
SHA1: |
e05a3e10670191e8729683fb45382689 |
User & Date: | mistachkin on 2016-12-18 03:10:32 |
Other Links: | branch diff | manifest | tags |
Context
2016-12-18
| ||
20:56 | Make the 'getCommonContainingDirectory' procedure work correctly for all corner cases. More cleanup. check-in: 2a6ac9473f user: mistachkin tags: uploaderClient | |
03:10 | Comments, cleanup, more work in progress on the uploader client. Not yet tested. Also, 'getContainingDirectory' still needs work to forbid mismatched root directories. check-in: e05a3e1067 user: mistachkin tags: uploaderClient | |
00:55 | More work getting the script block generator working. check-in: 2515a3ade8 user: mistachkin tags: uploaderClient | |
Changes
Modified client/1.0/neutral/pkgr.eagle from [46ce6d2906] to [6dfa391a89].
︙ | |||
350 351 352 353 354 355 356 | 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | - + | if {[catch { eval exec -success Success $openPgpInstalledCommand } result]} then { error "cannot use OpenPGP: may not be installed and/or configured" } } else { if {[catch { |
︙ |
Modified client/1.0/neutral/pkgr.eagle.asc from [4f9aea824a] to [1151a9c981].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - - - - - - - - - - - - - + + + + + + + + + + + + + | -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Eagle Package Repository |
Modified client/1.0/neutral/pkgr.eagle.harpy from [c814762109] to [ad1f66b9ba].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | THE ASSOCIATED SOFTWARE MAY NOT WORK PROPERLY IF THIS FILE IS ALTERED. --> <Certificate xmlns="https://eagle.to/2011/harpy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Protocol>None</Protocol> <Vendor>Mistachkin Systems</Vendor> |
Modified client/1.0/neutral/pkgr.eagle.harpy.asc from [e6c0f2e243] to [5194a87a9b].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - - - - - - - - - - - - - + + + + + + + + + + + + + | -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Eagle Package Repository |
Modified client/1.0/neutral/pkgr_upload.eagle from [06d64b587a] to [42f6088384].
︙ | |||
33 34 35 36 37 38 39 40 41 42 43 44 45 46 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | [file tail [info nameofexecutable]]\ [file tail [info script]] \[apiKey\] \[name\] \[version\] \[language\]\ \[fileName1\] ... \[fileNameN\]" exit 1 } # # NOTE: This procedure sets up the default values for all configuration # parameters used by the package uploader client. The script # argument is the fully qualified path and file name for the script # being evaluated. # proc setupUploadVars { script } { # # NOTE: What is the fully qualified path to the directory containing the # checkout for the package client? # variable checkoutDirectory if {![info exists checkoutDirectory]} then { set checkoutDirectory [file dirname $script] } # # NOTE: The command to use when attempting to stage package files using # Fossil. # variable fossilAddCommand; # DEFAULT fossil add {${fileName}} if {![info exists fossilAddCommand]} then { set fossilAddCommand {fossil add {${fileName}}} } # # NOTE: The command to use when attempting to commit package files using # Fossil. # variable fossilCommitCommand; # DEFAULT fossil commit ... if {![info exists fossilCommitCommand]} then { set fossilCommitCommand {fossil commit -m {${comment}}\ --branch {${branch}} --user anonymous --chdir \ {${checkoutDirectory}} --no-prompt} } # # NOTE: The regular expression pattern used when attempting to verify # that Fossil committed a set of files. # variable fossilCommitPattern; # DEFAULT: {^New_Version: ([0-9a-f]{40})$} if {![info exists fossilCommitPattern]} then { set fossilCommitPattern {^New_Version: ([0-9a-f]{40})$} } } # # NOTE: This procedure returns a string value, formatted for use within a # script block being processed by the [string map] command. The # value argument is the string value to format. No return value is # reserved to indicate an error. This procedure may not raise any # script errors. # |
︙ | |||
55 56 57 58 59 60 61 | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | + + + - + | return $value } else { return $list } } # # NOTE: This procedure processes a list of qualified file names and tries # to determine their common containing directory, if any. The # fileNames argument is the list of (fully?) qualified file names to |
︙ | |||
80 81 82 83 84 85 86 | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 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 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | - + + + + - + - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + | } } return $result } # |
︙ | |||
158 159 160 161 162 163 164 165 166 167 168 169 170 171 | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | -persistent false -usePgp true -useAutoPath true] %ns%::downloadFiles %language% %version% %platform% $fileNames $options %ns%::logoutAndResetCookie }] }]] } # # NOTE: This procedure attempts to stage the specified package files using # Fossil. The fileNames argument is a list of (fully?) qualified # local file names to stage. # proc stagePackageFiles { language version platform fileNames } { variable checkoutDirectory variable fossilAddCommand set relativeFileNames [getRelativeFileNames $fileNames] set savedPwd [pwd]; cd $checkoutDirectory foreach fileName $fileNames relativeFileName $relativeFileNames { file mkdir [file join \ $language $version $platform [file dirname $relativeFileName]] file copy $fileName $relativeFileName set fileName $relativeFileName if {[isEagle]} then { set fileName [::PackageRepository::formatExecArgument $fileName] if {[catch { eval exec -success Success [subst $fossilAddCommand] } error]} then { cd $savedPwd error [appendArgs \ "failed to stage file \"" $fileName "\": " $error] } } else { if {[catch { eval exec [subst $fossilAddCommand] } error]} then { cd $savedPwd error [appendArgs \ "failed to stage file \"" $fileName "\": " $error] } } } cd $savedPwd } # # NOTE: This procedure attempts to commit the staged package files to the # remote package file repository using Fossil. The varName argument # is the name of a scalar variable in the context of the immediate # caller that will receive the resulting Fossil check-in identifier. # proc commitPackageFiles { varName } { variable checkoutDirectory variable fossilCommitCommand variable fossilCommitPattern set branch ""; # TODO: Figure out a good branch. set comment ""; # TODO: Figure out a good comment. if {[isEagle]} then { if {[catch { eval exec -nocarriagereturns -stdout output -stderr error \ [subst $fossilCommitCommand] } result] == 0} then { set result [appendArgs $output $error] } else { return false } } else { if {[catch { eval exec [subst $fossilCommitCommand] } result]} then { return false } } if {[string length $varName] > 0} then { upvar 1 $varName checkin } if {![info exists result] || \ ![regexp -line -- $fossilCommitPattern $result dummy checkin]} then { return false } return true } # # NOTE: Figure out the fully qualified path to the current script file. # If necessary, add it to the auto-path for the interpreter. The # necessary supporting packages (i.e. the Package Repository and # other support packages) that are assumed to exist in the same # directory as the current script file. |
︙ | |||
189 190 191 192 193 194 195 | 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 | + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + | # package. # namespace eval ::PackageRepository { variable verboseUriDownload true } # # NOTE: This package requires both the package repository and downloader |
︙ |
Modified client/1.0/neutral/pkgr_upload.eagle.asc from [60f01e4cc7] to [f35eaacddd].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - - - - - - - - - - - - - + + + + + + + + + + + + + | -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Eagle Package Repository |
Modified client/1.0/neutral/pkgr_upload.eagle.harpy from [1d2925f0b5] to [4ce0ba16dd].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | THE ASSOCIATED SOFTWARE MAY NOT WORK PROPERLY IF THIS FILE IS ALTERED. --> <Certificate xmlns="https://eagle.to/2011/harpy" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Protocol>None</Protocol> <Vendor>Mistachkin Systems</Vendor> |
Modified client/1.0/neutral/pkgr_upload.eagle.harpy.asc from [f19af08e58] to [6121a4c8b4].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - - - - - - - - - - - - - + + + + + + + + + + + + + | -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Eagle Package Repository |