diff --git a/python/educational-python/build/groovy/org/jetbrains/intellij/build/pycharm/edu/PyCharmEduProperties.groovy b/python/educational-python/build/groovy/org/jetbrains/intellij/build/pycharm/edu/PyCharmEduProperties.groovy index eb91d109b2d3..8e343295e02e 100644 --- a/python/educational-python/build/groovy/org/jetbrains/intellij/build/pycharm/edu/PyCharmEduProperties.groovy +++ b/python/educational-python/build/groovy/org/jetbrains/intellij/build/pycharm/edu/PyCharmEduProperties.groovy @@ -34,6 +34,14 @@ class PyCharmEduProperties extends PyCharmPropertiesBase { fileset(file: "$context.paths.communityHome/LICENSE.txt") fileset(file: "$context.paths.communityHome/NOTICE.txt") } + + def files = new File("$pythonCommunityPath/educational-python/resources/").listFiles(new FilenameFilter() { + @Override + boolean accept(File dir, String name) { + return name.matches("EduTools-[0-9.]+-[0-9.]+-[0-9.]+.zip") + } + }) + context.ant.unzip(src: files[0], dest: "$targetDirectory/plugins/") } @Override diff --git a/python/educational-python/build/python-edu-build.iml b/python/educational-python/build/python-edu-build.iml index 275262d81506..20e14f858f11 100644 --- a/python/educational-python/build/python-edu-build.iml +++ b/python/educational-python/build/python-edu-build.iml @@ -4,6 +4,7 @@ + @@ -12,5 +13,6 @@ + \ No newline at end of file diff --git a/python/educational-python/build/src/SetupEduPlugin.kt b/python/educational-python/build/src/SetupEduPlugin.kt new file mode 100644 index 000000000000..e7cd53c13d11 --- /dev/null +++ b/python/educational-python/build/src/SetupEduPlugin.kt @@ -0,0 +1,21 @@ +import com.intellij.openapi.util.io.FileUtil +import com.intellij.util.io.ZipUtil +import java.io.File +import java.io.FileFilter + +/** + * Deploys Educational plugin into config/plugins directory. + * Plugins directory is specified in "idea.plugins.path" system property. + */ +fun main(args: Array) { + var rootPath = File("").absolutePath + val outputDir = File(rootPath, FileUtil.toSystemDependentName(System.getProperty("idea.plugins.path"))) + val communityPath = FileUtil.join(rootPath, "community") + if (File(communityPath).exists()) { + rootPath = communityPath + } + val resourcesPath = FileUtil.join(rootPath, "python", "educational-python", "resources") + val files = File(resourcesPath).listFiles( + FileFilter { pathname -> pathname.name.matches(Regex("EduTools-[0-9.]+-[0-9.]+-[0-9.]+.zip")) }) + ZipUtil.extract(files[0], outputDir, null) +} diff --git a/python/educational-python/resources/EduTools-1.0.2-2017.3-28.zip b/python/educational-python/resources/EduTools-1.0.2-2017.3-28.zip new file mode 100644 index 000000000000..7cf65fa33626 Binary files /dev/null and b/python/educational-python/resources/EduTools-1.0.2-2017.3-28.zip differ