Skip to content

Commit

Permalink
Update version
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavobazzo committed Nov 4, 2022
1 parent 1725f2a commit 5f6566b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 16 deletions.
14 changes: 0 additions & 14 deletions create-zip.bat

This file was deleted.

30 changes: 30 additions & 0 deletions create-zip.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
function Get-PluginVersion {
$file_data = Get-Content ./src/version.php | Where-Object {$_ -like "*$plugin->release*"}

$CharArray = $file_data.Split("=")

$result = $CharArray[1].replace("'", "").replace(";","").trim()

return $result
}

function Create-Zipfile($zipName, $pluginName, $pluginVersion){
#remove the current zip file
$zipFile="$($zipName)-$($pluginVersion).zip"

if(Test-Path -Path $zipFile -PathType Leaf){
Remove-Item -Path $zipFile
}

#zip the folder except the folders .cache and node_modules
& "c:\Program Files\7-Zip\7z.exe" a -mx "$zipFile" "src\*"-mx0 -xr!"src\react\.cache" -xr!"src\react\node_modules" -xr!"src\react\package-lock.json"

#set the plugin name
& "c:\Program Files\7-Zip\7z.exe" rn "$zipFile" "src\" "$pluginName\"
}

$zipName="theme_recit_anglais"
$pluginName="recit_anglais"
$pluginVersion = Get-PluginVersion

Create-Zipfile $zipName $pluginName $pluginVersion
4 changes: 2 additions & 2 deletions src/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
$plugin->version = 2022100100;

// This is the named version.
$plugin->release = 'v2.0.1-stable';
$plugin->release = 'v2.1.0-beta';

$plugin->supported = [39, 400]; // Moodle 3.9.x, 3.10.x and 3.11.x are supported.

// This is a stable release.
$plugin->maturity = MATURITY_STABLE;
$plugin->maturity = MATURITY_BETA;

// This is the version of Moodle this plugin requires.
$plugin->requires = 2020061500.00; // Moodle 3.9.0
Expand Down

0 comments on commit 5f6566b

Please sign in to comment.