Skip to content

Commit

Permalink
Prepare rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmr committed Dec 16, 2021
1 parent 7d6fc29 commit 4c43ef1
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 2 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- '*.*.*' # Push events to matching ex:20.15.10

name: Create release with tag
env:
TAG_VALUE: ${GITHUB_REF/refs\/tags\//}
jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build project # This would actually build your project, using zip for an example artifact
id: build_
env:
GITHUB_NAME: ${{ github.event.repository.name }}


run: sudo apt-get install libxml-xpath-perl;echo $(xpath -e '/root/versions/version[num="'${GITHUB_REF/refs\/tags\//}'"]/compatibility/text()' $GITHUB_NAME.xml);echo ::set-output name=version_glpi::$(xpath -e '/root/versions/version[num="'${GITHUB_REF/refs\/tags\//}'"]/compatibility/text()' $GITHUB_NAME.xml); rm -rf $GITHUB_NAME.xml tools wiki screenshots test .git .github ISSUE_TEMPLATE.md TODO.txt $GITHUB_NAME.png;cd ..; tar jcvf glpi-$GITHUB_NAME-${GITHUB_REF/refs\/tags\//}.tar.bz2 $GITHUB_NAME;ls -al;echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//};echo ${{ steps.getxml.outputs.info }};
# run: rm -rf $GITHUB_NAME.xml tools wiki screenshots test ISSUE_TEMPLATE.md TODO.txt $GITHUB_NAME.png; tar -zcvf glpi-$GITHUB_NAME-$GITHUB_TAG.tar.gz $GITHUB_NAME
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: |
GLPI ${{ steps.build_.outputs.version_glpi }} : Version ${{ github.ref }} disponible / available
body : Version ${{ steps.build_.outputs.tag }} released for GLPI ${{ steps.build_.outputs.version_glpi }}
draft: false
prerelease: true
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_NAME: ${{ github.event.repository.name }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: /home/runner/work/${{ github.event.repository.name }}/glpi-${{ github.event.repository.name }}-${{ steps.build_.outputs.tag }}.tar.bz2
asset_name: glpi-${{ github.event.repository.name }}-${{ steps.build_.outputs.tag }}.tar.bz2
asset_content_type: application/zip

2 changes: 1 addition & 1 deletion hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function plugin_satisfaction_install() {
include_once(Plugin::getPhpDir('satisfaction')."/inc/notificationtargetticket.class.php");

if (!$DB->tableExists("glpi_plugin_satisfaction_surveys")) {
$DB->runFile(Plugin::getPhpDir('satisfaction')."/install/sql/empty-1.5.0.sql");
$DB->runFile(Plugin::getPhpDir('satisfaction')."/install/sql/empty-1.6.0.sql");

} else {
if (!$DB->fieldExists("glpi_plugin_satisfaction_surveyquestions", "type")) {
Expand Down
69 changes: 69 additions & 0 deletions install/sql/empty-1.6.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# noinspection SqlNoDataSourceInspectionForFile

CREATE TABLE `glpi_plugin_satisfaction_surveys` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`entities_id` int(11) NOT NULL DEFAULT 0,
`is_recursive` tinyint(1) NOT NULL default '0',
`is_active` tinyint(1) NOT NULL default '0',
`name` varchar(255) collate utf8mb4_unicode_ci default NULL,
`comment` text collate utf8mb4_unicode_ci default NULL,
`date_creation` timestamp NULL DEFAULT NULL,
`date_mod` timestamp NULL DEFAULT NULL,
`reminders_days` int(11) NOT NULL default '30',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

CREATE TABLE `glpi_plugin_satisfaction_surveyquestions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`plugin_satisfaction_surveys_id` int(11) NOT NULL,
`name` text collate utf8mb4_unicode_ci default NULL,
`type` varchar(255) collate utf8mb4_unicode_ci default NULL,
`comment` text collate utf8mb4_unicode_ci default NULL,
`number` int(11) NOT NULL DEFAULT 0,
`default_value` int(11) NOT NULL DEFAULT 1,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

CREATE TABLE `glpi_plugin_satisfaction_surveyanswers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`answer` text collate utf8mb4_unicode_ci default NULL,
`comment` text collate utf8mb4_unicode_ci default NULL,
`plugin_satisfaction_surveys_id` int(11) NOT NULL,
`ticketsatisfactions_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

DROP TABLE IF EXISTS `glpi_plugin_satisfaction_surveytranslations`;
CREATE TABLE `glpi_plugin_satisfaction_surveytranslations` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`plugin_satisfaction_surveys_id` int(11) NOT NULL DEFAULT '0',
`glpi_plugin_satisfaction_surveyquestions_id` int(11) NOT NULL DEFAULT '0',
`language` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`value` text COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`id`),
UNIQUE KEY `unicity` (`plugin_satisfaction_surveys_id`,`glpi_plugin_satisfaction_surveyquestions_id`,`language`),
KEY `typeid` (`plugin_satisfaction_surveys_id`,`glpi_plugin_satisfaction_surveyquestions_id`),
KEY `language` (`language`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

DROP TABLE IF EXISTS `glpi_plugin_satisfaction_surveyreminders`;
CREATE TABLE `glpi_plugin_satisfaction_surveyreminders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`plugin_satisfaction_surveys_id` int(11) NOT NULL,
`name` text collate utf8mb4_unicode_ci default NULL,
`duration_type` int(11) NOT NULL,
`duration` int(11) NOT NULL,
`is_active` tinyint(1) NOT NULL default '0',
`comment` text collate utf8mb4_unicode_ci default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

DROP TABLE IF EXISTS `glpi_plugin_satisfaction_reminders`;
CREATE TABLE `glpi_plugin_satisfaction_reminders` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` int(11) NOT NULL DEFAULT '0',
`tickets_id` int(11) NOT NULL,
`date` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unicity` (`tickets_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
5 changes: 5 additions & 0 deletions satisfaction.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@
<author>Infotel</author>
</authors>
<versions>
<version>
<num>1.6.0-rc1</num>
<compatibility>~10.0</compatibility>
<download_url>https://github.com/pluginsGLPI/satisfaction/releases/download/1.6.0-rc1/glpi-satisfaction-1.6.0-rc1.tar.bz2</download_url>
</version>
<version>
<num>1.5.2</num>
<compatibility>~9.5.0</compatibility>
Expand Down
2 changes: 1 addition & 1 deletion setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* Init the hooks of the plugins -Needed
*/

define ("PLUGIN_SATISFACTION_VERSION", "1.6.0");
define ("PLUGIN_SATISFACTION_VERSION", "1.6.0-rc1");

// Minimal GLPI version, inclusive
define('PLUGIN_SATISFACTION_MIN_GLPI', '10.0');
Expand Down

0 comments on commit 4c43ef1

Please sign in to comment.