Skip to content

Commit

Permalink
update our build versions (#1973)
Browse files Browse the repository at this point in the history
* update our build versions

* fix a test
  • Loading branch information
devoncarew committed Mar 21, 2018
1 parent 2ddbf4b commit 050a699
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,6 +1,7 @@
out/
artifacts/
build/
releases/
flutter-intellij.jar
flutter-intellij.zip
packages
Expand Down
8 changes: 4 additions & 4 deletions product-matrix.json
Expand Up @@ -18,8 +18,8 @@
"name": "IntelliJ",
"version": "3.1",
"ideaProduct": "android-studio",
"ideaVersion": "173.4595152",
"dartPluginVersion": "173.4301.22",
"ideaVersion": "173.4658569",
"dartPluginVersion": "173.4700",
"sinceBuild": "173.0",
"untilBuild": "173.*",
"filesToSkip": [
Expand All @@ -30,8 +30,8 @@
"name": "IntelliJ",
"version": "2018.1",
"ideaProduct": "ideaIC",
"ideaVersion": "181.3741.2",
"dartPluginVersion": "181.3741.1",
"ideaVersion": "181.4203.400",
"dartPluginVersion": "181.4203.498",
"sinceBuild": "181.0",
"untilBuild": "181.*"
}
Expand Down
14 changes: 7 additions & 7 deletions tool/plugin/lib/plugin.dart
Expand Up @@ -205,7 +205,7 @@ Future<int> moveToArtifacts(ProductCommand cmd, BuildSpec spec) async {
var file = plugins[spec.pluginId];
var args = new List<String>();
args.add(p.join(rootPath, 'build', file));
args.add(cmd.archiveFilePath(spec));
args.add(cmd.releasesFilePath(spec));
return await exec('mv', args);
}

Expand Down Expand Up @@ -562,13 +562,13 @@ class BuildCommand extends ProductCommand {
}

// zip it up
result = await zip('build/flutter-intellij', archiveFilePath(spec));
result = await zip('build/flutter-intellij', releasesFilePath(spec));
if (result != 0) {
log('zip failed: ${result.toString()}');
return new Future(() => result);
}
separator('BUILT');
log('${archiveFilePath(spec)}');
log('${releasesFilePath(spec)}');
}

return 0;
Expand Down Expand Up @@ -768,7 +768,7 @@ class DeployCommand extends ProductCommand {
var value = 0;
try {
for (var spec in specs) {
var filePath = archiveFilePath(spec);
var filePath = releasesFilePath(spec);
value = await upload(filePath, plugins[spec.pluginId]);
if (value != 0) {
return value;
Expand Down Expand Up @@ -896,10 +896,10 @@ abstract class ProductCommand extends Command {
return rel;
}

String archiveFilePath(BuildSpec spec) {
var subDir = isReleaseMode ? 'release_$releaseMajor' : '';
String releasesFilePath(BuildSpec spec) {
var subDir = isReleaseMode ? 'release_$releaseMajor' : 'release_master';
var filePath = p.join(
rootPath, 'artifacts', subDir, spec.version, 'flutter-intellij.zip');
rootPath, 'releases', subDir, spec.version, 'flutter-intellij.zip');
return filePath;
}

Expand Down
8 changes: 4 additions & 4 deletions tool/plugin/test/plugin_test.dart
Expand Up @@ -117,11 +117,11 @@ void main() {
cmd = (runner.commands['deploy'] as TestDeployCommand);
});
expect(
cmd.paths.map((p) => p.substring(p.indexOf('artifacts'))),
cmd.paths.map((p) => p.substring(p.indexOf('releases'))),
orderedEquals([
'artifacts/release_19/3.0/flutter-intellij.zip',
'artifacts/release_19/3.1/flutter-intellij.zip',
'artifacts/release_19/2018.1/flutter-intellij.zip',
'releases/release_19/3.0/flutter-intellij.zip',
'releases/release_19/3.1/flutter-intellij.zip',
'releases/release_19/2018.1/flutter-intellij.zip',
]));
});
});
Expand Down

0 comments on commit 050a699

Please sign in to comment.