Verified Commit fa29c79b authored by Recteur LP's avatar Recteur LP
Browse files

Release 0.3.1

parent ef21986f
Pipeline #1445 passed with stage
in 3 minutes and 45 seconds
[bumpversion]
current_version = 0.3.0-beta1
current_version = 0.3.1
commit = True
tag = True
tag_name = {new_version}
......
# 0.3.1
- fix linux icon
- update release notes
- update docs
- update submenu icon
- add a button to download an easy repo config file
- Fix changelog
- Fix docs gen
- add snapshot button
- Enable snapshot a env, removing rpm is disabled if snapshot exist
- require pyrmin > 0.4.0
- Add user_repos config option to enable one auto repo per user
- Update upload template
- Fix unit-test
- DNF 4 with DeltaRPM
- Fedora 31 Base Image
# 0.3.0-beta1
- DNF 4.0.9 without drpm
......
......@@ -14,7 +14,7 @@ module.exports = function(grunt) {
pyrmin: {
options: {
sourceMap: 'packagemanager.js.map',
banner: '/*! Package Manager JS 0.3.0 */'
banner: '/*! Package Manager JS 0.3.1 */'
},
files: {
'packagemanager/js/packagemanager.utils.min.js': ['src/js/packagemanager.utils.js'],
......
......@@ -23,7 +23,7 @@ tests_env: env
@env/bin/python3 -m pip install -r tests/requirements.txt
changelog:
@[ "$$(grep -c $(shell git tag --sort version:refname | tail -2 | tail -1) CHANGELOG.md)" -eq "0" ] && echo "$$(echo "# $(shell git tag --sort version:refname | tail -2 | tail -1)" && echo && git log $(shell git tag --sort version:refname | tail -2 | head -1)...$(shell git tag --sort version:refname | tail -2 | tail -1) --pretty=tformat:' - %s' --reverse && echo ' ')" | cat - CHANGELOG.md > temp && mv temp CHANGELOG.md || echo "CHANGELOG already uptodate"
@[ "$$(grep -c $(shell cat VERSION) CHANGELOG.md)" -eq "0" ] && echo "$$(echo "# $(shell cat VERSION)" && echo && git log HEAD...$(shell git tag --sort version:refname | tail -2 | tail -1) --pretty=tformat:' - %s' --reverse && echo ' ')" | cat - CHANGELOG.md > temp && mv temp CHANGELOG.md || echo "CHANGELOG already uptodate"
@echo "$$(echo 'Release Notes' && echo '-------------' && echo ' ')" | cat - CHANGELOG.md > docs/releasenotes.rst && pandoc --from=markdown --to=rst --output=docs/releasenotes.rst docs/releasenotes.rst
pep: tests_env
......
PackageManager 0.3.0
PackageManager 0.3.1
====================
[PyRmin](https://pyrmin.io) Plugin
Need [PyRmin](https://pyrmin.io) 0.4.0
[Online Documentation](https://pyrmin.io/docs/packagemanager/en/latest/)
# Pre-requirements
- DNF 2.5
- DNF 4
- createrepo_c
```bash
......
Release Notes
-------------
0.3.1
=====
- fix linux icon
- update release notes
- update docs
- update submenu icon
- add a button to download an easy repo config file
- Fix changelog
- Fix docs gen
- add snapshot button
- Enable snapshot a env, removing rpm is disabled if snapshot exist
- require pyrmin > 0.4.0
- Add user_repos config option to enable one auto repo per user
- Update upload template
- Fix unit-test
- DNF 4 with DeltaRPM
- Fedora 31 Base Image
0.3.0-beta1
===========
......
{
"name": "packagemanager",
"version": "0.3.0",
"version": "0.3.1",
"private": true,
"devDependencies": {
"grunt": "^1.0.3",
......
......@@ -18,7 +18,7 @@ __name__ = "Package Manager"
__description__ = "\
Plugin to Mirror & Manage your RPM Repositories by CLI and/or Web UI."
__logo__ = "/plugins/packagemanager/img/logo.png"
__version__ = "0.3.0"
__version__ = "0.3.1"
__search__ = True
__pyrmin_version__ = "0.4.0"
__namespace__ = "packagemanager"
......
/*! Package Manager JS 0.3.0 */
/*! Package Manager JS 0.3.1 */
function list_repo(){env=document.URL.indexOf("env=")!=-1?getParameterByName("env"):$("#env").val(),id=getParameterByName("id"),get_data("/rest/packagemanager/repos/"+id+"/list/"+env,list_callback)}function update_repo(){env=document.URL.indexOf("from=")!=-1?getParameterByName("from"):"latest",id=getParameterByName("id"),get_data("/rest/packagemanager/repos/"+id+"/update/"+env)}function compare_repo(a){from_env=document.URL.indexOf("env=")!=-1?getParameterByName("env"):$("#env").val(),id=getParameterByName("id"),get_data("/rest/packagemanager/repos/"+id+"/compare/"+from_env,compare_callback,{"with":a})}function push_pkgs(){return to_envs=$("#push_envs").val(),0===to_envs.length?void pyrmin().notify("error","Push Action","No environments selected !"):(rpms=get_selected(),totalrpms=rpms.length,rpm_list=[],$.each(rpms,function(a){rpm_list.push(rpms[a][0].replace(/<i(?:.)+i>\s*/i,"")+"-"+rpms[a][1].replace(/<span>/i,"").replace(/<\/span>/i,""))}),from_env=document.URL.indexOf("env=")!=-1?getParameterByName("env"):$("#env").val(),id=getParameterByName("id"),void post_data("/rest/packagemanager/repos/"+id+"/push/"+from_env,push_callback,{to_env:to_envs,pkgs:rpm_list}))}function remove_confirm(a){pyrmin().confirm("Deletion","Are you sure you want to remove from "+a+" ?","fa fa-trash",remove_pkgs,a)}function remove_pkgs(a){rpms=get_selected(),totalrpms=rpms.length,rpm_list=[],$.each(rpms,function(a){rpm_list.push(rpms[a][0].replace(/<i(?:.)+i>\s*/i,"")+"-"+rpms[a][1].replace(/<span(.*)<strong>/i,"").replace(/<\/strong><\/span>/i,""))}),id=getParameterByName("id"),post_data("/rest/packagemanager/repos/"+id+"/remove/"+a,remove_callback,{pkgs:rpm_list})}function push_callback(a,b){0===a.status&&(pyrmin().notify("success","Copied !","You pushed "+totalrpms+" rpms"),$("#pushModal").modal("hide"))}function remove_callback(a,b){0===a.status?(pyrmin().notify("success","Removed !","You removed "+totalrpms+" rpms"),remove_selected(),$("#rmModal").modal("hide")):pyrmin().notify("error","Remove failed",a.error)}function erratas_callback(a,b){0===a.status&&pyrmin().notify("success","Erratas","You have "+a.erratas+" erratas")}function updatemeta_callback(a,b){0===a.status?(pyrmin().notify("success",getParameterByName("id"),"MetaData Updated !"),$("#ManageModal").modal("hide")):pyrmin().notify("error",getParameterByName("id"),"Cannot Update MetaData.")}function snaptshot_callback(a,b){0===a.status?(pyrmin().notify("success",getParameterByName("id"),a.message),$("#ManageModal").modal("hide")):pyrmin().notify("error",getParameterByName("id"),a.error)}function init_controls(a){a.on("select",function(a,b,c,d){$("#action_box").show()}).on("deselect",function(a,b,c,d){0===get_selected().length?$("#action_box").hide():$("#action_box").show()}),$("#upload_btn").click(function(){$("#ManageModal").modal("hide"),$("#uploadModal").modal("toggle")}),$("#manage_btn").click(function(){$("#ManageModal").modal("toggle")}),$("#pushrpms_btn").click(function(){confirmpush()}),$("#remove_btn").click(function(){confirmremove()}),$(".overlay").css("visibility","hidden")}function list_callback(a,b){uniq=0,lastname="",rpms="",drpms="",nunjucks.configure("/plugins/packagemanager/templates",{autoescape:!0}),$("#ManageModal .modal-body").append(nunjucks.render("repo_widget.html",{repo:a})),i=0,$.each(a.pkgs,function(b){i++,lastname!=a.pkgs[b].name&&(lastname=a.pkgs[b].name,uniq++),rpms+="<tr><td>"+a.pkgs[b].name+"</td><td>"+a.pkgs[b].full_version+'</td><td><span class="float-left">'+a.pkgs[b].summary+'</span><span class="float-right"><a id="event_'+i+'"><i class="fa fa-info-circle fa-fw"></i></a> <a href="download/'+a.id+"/"+a.pkgs[b].name+"-"+a.pkgs[b].full_version+'.rpm"><i class="fa fa-download fa-fw"></i></a></span></td></tr>',$("#listrpm tbody").on("click","a#event_"+i,function(c){c.stopPropagation(),changelog(a.pkgs[b].name+"-"+a.pkgs[b].full_version,getParameterByName("id"))})}),$.each(a.drpms,function(b){drpms+="<tr><td>"+a.drpms[b]+"</td></tr>"}),$("#listrpm > tbody").append(rpms),$("#listdrpm > tbody").append(drpms),$("#sum_1").text(a.pkgs.length),$("#total_drpms").text(a.drpms.length),$("#sum_2").text(uniq),$("#sum_3").text(a.erratas.length),table=$("#listrpm").DataTable({lengthMenu:[[10,25,50,-1],[10,25,50,"All"]],responsive:!0,select:!0,dom:"Blfrtip",buttons:["selectAll","selectNone"],language:{buttons:{selectAll:"Select all",selectNone:"Select none"}}}),dtable=$("#listdrpm").DataTable({lengthMenu:[[10,25,50,-1],[10,25,50,"All"]],responsive:!0,select:!0,dom:"Blfrtip",buttons:["selectAll","selectNone"],language:{buttons:{selectAll:"Select all",selectNone:"Select none"}}}),$("#action_box").append(' <button class="btn btn-default btn-flat btn-sm" id="pushrpms_btn" style="margin-left: 3px;">Push <i class="fa fa-arrow-circle-right fa-fw"></i></button>'),document.URL.indexOf("search=")!=-1&&table.search(getParameterByName("search")).draw(),$("#rpms").fileinput({allowedFileExtensions:["rpm"],previewFileIconSettings:{rpm:'<img src="/plugins/packagemanager/img/application-x-rpm.png">'}}),init_controls(table)}function erase_checkbox(){$("#erase_cb").is(":checked")?$("#upload_form").prop("action","upload?erase=true"):$("#upload_form").prop("action","upload")}function compare_callback(a,b){0===a.status&&($("#listrpm").DataTable().clear(),$("#listrpm").DataTable().destroy(),$("#upload_btn").remove(),$("#action_btn").html('<button class="btn btn-default btn-flat btn-sm" id="pushrpms_btn" style="margin-left: 5px;">Push selected <i class="fa fa-arrow-circle-right fa-fw"></i></button>'),$("#sum_1").text(a.summary.added),$("#text_1").text("added"),$("#sum_2").text(a.summary.modified),$("#text_2").text("modified"),$("#sum_4").text(a.summary.remove),$("#div_3").css("visibility","visible"),string_to_append="","error"in a?string_to_append+='<tr><td></td><td style="text-align: center;" class="text-danger"><i class="fas fa-ban"></i> '+a.error+"</td><td></td></tr>":($.each(a.add,function(b){string_to_append+='<tr><td><i class="fa fa-plus"></i> '+a.add[b].name+"</td><td>"+a.add[b].full_version+"</td><td>"+a.add[b].summary+"</td></tr>"}),$.each(a.modified,function(b){string_to_append+='<tr><td><i class="fa fa-bug"></i> '+a.modified[b].name+"</td><td>"+a.modified[b].full_version+'</td><td class="details-control">'+a.modified[b].logs.trunc(50)+' <i class="fa fa-chevron-circle-left fa-fw"></i></td></tr>'})),$("#listrpm > tbody").append(string_to_append),$(".tooltipinit").tooltip(),table=$("#listrpm").DataTable({order:[[1,"asc"]],lengthMenu:[[10,25,50,-1],[10,25,50,"All"]],responsive:!0,select:!0,dom:"Blfrtip",buttons:["selectAll","selectNone"],language:{buttons:{selectAll:"Select all",selectNone:"Select none"}}}),"error"in a||$("#listrpm tbody").on("click","td.details-control",function(){var a=$(this).closest("tr"),b=table.row(a);b.child.isShown()?(b.child.hide(),a.removeClass("shown")):(b.child(format(b.data())).show(),a.addClass("shown"))})),init_controls(table)}function confirmpush(){rpms=get_selected(),totalrpms=rpms.length,0===totalrpms?pyrmin().notify("error","No rpms selected",""):(list="",$.each(rpms,function(a){list=list.concat("<tr><td>"+rpms[a][0].replace(/<i(?:.)+i>\s*/i,"")+"</td><td>"+rpms[a][1]+"</td></tr>")}),to=getParameterByName("with"),$("#pushModal .modal-body").html('<div style="margin:0; padding:0; height: 200px; overflow: auto; font-size: 10pt;"><table style="width: 100%;">'+list+"</table></div>"),$("#pushModal").modal("show"))}function confirmremove(){rpms=get_selected(),totalrpms=rpms.length,list="",$.each(rpms,function(a){list=list.concat("<tr><td>"+rpms[a][0].replace(/<i(?:.)+i>\s*/i,"")+"</td><td>"+rpms[a][1]+"</td></tr>")}),env=document.URL.indexOf("from=")!=-1?getParameterByName("from"):$("#env").val(),$("#rmModal .modal-body").html('<div style="margin:0; padding:0; height: 200px; overflow: auto; font-size: 10pt;"><table style="width: 100%;">'+list+"</table></div>"),$("#rmModal").modal("show")}function get_selected(){return $("#listrpm").DataTable().rows(".selected").data()}function remove_selected(){return $("#listrpm").DataTable().rows(".selected").remove().draw()}function format(a){return from_env=document.URL.indexOf("env=")!=-1?getParameterByName("env"):$("#env").val(),id=getParameterByName("id"),pkg_name=a[0].replace(/<i [^>]+>()<\/i>/,"")+"-"+a[1].match(/<span>([^<]+)<\/span>/)[1],pkg_name=pkg_name.trim(),pkg=load_data2("/rest/packagemanager/repos/"+id+"/info/"+from_env+"/",{name:pkg_name}),msg='<table cellpadding="5" cellspacing="0" border="0" style="padding-left:50px;"><tr><td><pre>'+pkg.logs.slice(0,5).join("</pre><pre>")+"</pre></td></tr></table>",msg}function getParameterByName(a){var b=RegExp("[?&]"+a+"=([^&]*)").exec(window.location.search);return b&&decodeURIComponent(b[1].replace(/\+/g," "))}function render_form(){nunjucks.configure("/plugins/packagemanager/templates",{autoescape:!0}),$("#ManageModal .modal-body").append(nunjucks.render("erratas_form.html",{}));var a=$("#example-form");a.validate({errorPlacement:function(a,b){b.before(a)},rules:{confirm:{equalTo:"#password"}}}),a.children("div").steps({headerTag:"h3",bodyTag:"section",transitionEffect:"slideLeft",onStepChanging:function(b,c,d){if(a.validate().settings.ignore=":disabled,:hidden",c<d){if(a.valid()){if("null"!=$("#installgroupselect").val()){switch(d){case 0:width=1;break;case 1:width=30;break;case 2:width=60;break;case 3:width=90}return $(".progress-bar").css("width",width+"%").attr("aria-valuenow",width),!0}return!1}return!1}return $(".progress-bar").css("width",width+"%").attr("aria-valuenow",width),!0},onStepChanged:function(a,b){$(".apptitle").html("Add "+$("#appname").val()),$("#devselect").chosen(),$("#preprodselect").chosen(),$("#prodselect").chosen()},onFinishing:function(b,c){return a.validate().settings.ignore=":disabled",a.valid()},onFinished:function(a,b){pyrmin().notify("success","test")}}),$("#example-form").iCheck({checkboxClass:"icheckbox_flat-green",radioClass:"iradio_flat-green"}),$("#installgroupselect").chosen()}String.prototype.trunc=String.prototype.trunc||function(a){return this.length>a?this.substr(0,a-1)+"&hellip;":this},$(document).ready(function(){if(document.URL.indexOf("/packagemanager/")!=-1){$("#action_box").hide(),from_env=document.URL.indexOf("env=")!=-1?getParameterByName("env"):$("#env").val(),config=pyrmin().get("/rest/settings/config/packagemanager").config;var a="success",b="Latest",c="";$.each(config.env,function(d){config.env[d].name.toLowerCase()==from_env.toLowerCase()&&(a=config.env[d]["color-class"]||"info",b=config.env[d].name.toUpperCase(),c=config.env[d]["icon-class"])}),$(".text-color").addClass("text-"+a),$(".card-color").addClass("card-"+a),$(".btn-color").addClass("btn-"+a),$(".label-color").text(b),document.URL.indexOf("with=")!=-1?($("#update_meta_btn").hide(),compare_repo(getParameterByName("with"))):list_repo()}});
//# sourceMappingURL=packagemanager.min.js.map
\ No newline at end of file
/*! Package Manager JS 0.3.0 */
/*! Package Manager JS 0.3.1 */
function changelog(a,b){post_data("/rest/packagemanager/repos/"+b+"/info/",changelog_callback,{name:a})}function changelog_callback(a,b){pyrmin().modal("info_Modal"),0===a.status?($("#info_Modal .modal-body").empty(),nunjucks.configure("/plugins/packagemanager/templates",{autoescape:!0}),$("#info_Modal .modal-body").append(nunjucks.render("pkg_info.html",{pkg:a,date:moment.unix(a.buildtime).format()})),pyrmin().switchModals("#searchmodal","#info_Modal")):pyrmin().notify("error",a,"Cannot Fetch Changelog.")}function repodetails_callback(a,b){0===a.status&&(pyrmin().modal("repo_details"),pyrmin().switchModals("#ManageModal","#repo_details"),$("#repo_details .modal-body").html("<pre>"+JSON.stringify(a,null,2)+"</pre>"),$("#repo_details .modal-title").html(a.id),$("#repo_details .modal-header").prepend($("#repo_details .modal-title")))}$(document).ready(function(){pyrmin().add_vendor(["datatables","select2","nunjucks","momentjs","steps","icheck","chosen","odometer","fileinput"]),$(".dropdown-toggle").dropdown(),$(".select2").select2()});
//# sourceMappingURL=packagemanager.utils.min.js.map
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment