|
| 1 | +package io.sdkman.changelogs |
| 2 | + |
| 3 | +import com.github.mongobee.changeset.{ChangeLog, ChangeSet} |
| 4 | +import com.mongodb.client.MongoDatabase |
| 5 | + |
| 6 | +@ChangeLog(order = "073") |
| 7 | +class ToolkitMigrations { |
| 8 | + |
| 9 | + val CandidateName = "toolkit" |
| 10 | + |
| 11 | + @ChangeSet( |
| 12 | + order = "001", |
| 13 | + id = "001-add_toolkit_migrations_candidate", |
| 14 | + author = "sanshengshui" |
| 15 | + ) |
| 16 | + def migration001(implicit db: MongoDatabase): Candidate = { |
| 17 | + Candidate( |
| 18 | + candidate = CandidateName, |
| 19 | + name = "Toolkit Migrations", |
| 20 | + description = |
| 21 | + "Toolkit is a client command line tool that supports multiple IoT protocols. for example, MQTT and COAP protocols" + |
| 22 | + "Provide a user optimized client tool for IoT developers and learners", |
| 23 | + websiteUrl = "https://github.com/IoT-Technology/IoT-Toolkit" |
| 24 | + ).insert() |
| 25 | + } |
| 26 | + |
| 27 | + @ChangeSet( |
| 28 | + order = "002", |
| 29 | + id = "002-add_toolkit_0.4.0_as_default", |
| 30 | + author = "sanshengshui" |
| 31 | + ) |
| 32 | + def migration002(implicit db: MongoDatabase) = |
| 33 | + Map( |
| 34 | + MacOSX -> "toolkit-0.4.0-osx-x86_64.zip", |
| 35 | + Linux64 -> "toolkit-0.4.0-linux-x86_64.zip", |
| 36 | + Windows -> "toolkit-0.4.0-windows-x86_64.zip" |
| 37 | + ).map { |
| 38 | + case (platform, binary) => |
| 39 | + Version( |
| 40 | + "toolkit", |
| 41 | + "0.4.0", |
| 42 | + s"https://github.com/IoT-Technology/IoT-Toolkit/releases/download/0.4.0/$binary", |
| 43 | + platform |
| 44 | + ) |
| 45 | + } |
| 46 | + .toList |
| 47 | + .validate() |
| 48 | + .insert() |
| 49 | + .asCandidateDefault() |
| 50 | + |
| 51 | +} |
0 commit comments