Skip to content

Commit

Permalink
バージョン管理スタート
Browse files Browse the repository at this point in the history
  • Loading branch information
okapiffxiv committed Nov 24, 2018
1 parent ad2e969 commit 797b359
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
5 changes: 3 additions & 2 deletions clsMenu.gs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

var Menu = function () {
var ui = SpreadsheetApp.getUi();
var menu = ui.createMenu('タイムライン');
var menuTitle = "タイムライン";
var menu = ui.createMenu(menuTitle);
var booTlSkill = "✓";
a = booOutputTlSkill();
if(!booOutputTlSkill()) booTlSkill = "";

menu.addSubMenu(
Expand Down Expand Up @@ -39,6 +39,7 @@ var Menu = function () {
menu.addItem("ユーザ設定("+ getUserName() +")", "ユーザ名設定");
menu.addItem("ViewLogを出力", "ViewLogをインポート")
menu.addItem("logsシートをリセット", "Logsシートをリセット")
menu.addItem("最新のシート情報(ver."+ VERSION +")", "githubへ移動")

menu.addToUi();

Expand Down
4 changes: 4 additions & 0 deletions confCommon_default.gs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//////////////////////////////////////////
//// 共通定義
//////////////////////////////////////////
//var VERSION = "1.0.0";
//var objSheet;
//var timezone = 'JST';
//var COL_OUTPUT_SKILL = "C2";
Expand All @@ -17,7 +18,9 @@
//var SHEET_TIMELINE = "timeline";
//var SHEET_LOG = "viewlog";
//var SHEET_SETTING = "設定";
//var SHEET_VERSION = "バージョン";
//
//var VERSION_SHEET_ID = "";
//var TMP_SHEET_ID = "";
//var LOGS_KEY = ""
//var LOGS_HOST = "https://ja.fflogs.com:443/v1/";
Expand Down Expand Up @@ -92,6 +95,7 @@
//var ERR_NO_TEMP = "テンプレートシートがありません";
//var ERR_NO_LOGS = "logsシートがありません";
//var ERR_NO_SETTING = "未設定";
//var ERR_LINK_GITHUB = "タイムラインシートのバージョン管理はgithubで行っています。\\n最新バージョンの確認、スプレットシートの入手は以下のURLへアクセスしてください\\n\\nhttps://github.com/okapiffxiv/xivtlsheet";
//
//// BRD定義
//var BRD_Menuett = "メヌエット";
Expand Down
13 changes: 13 additions & 0 deletions functions.gs
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,19 @@ function copyTempSheets_ (sheetName, toName) {
}


// バージョンチェック
function booUpdate() {
// ID からスプレッドシートを取得 COL_LASTEST_VERSION
var book = SpreadsheetApp.getActiveSpreadsheet();
var sheet     = book.getSheetByName(SHEET_SETTING);
var lastest = sheet.getRange(COL_LASTEST_VERSION).getValue();

Browser.msgBox(VERSION + " != " + lastest, Browser.Buttons.OK)
if (VERSION != lastest) return true;
return false;
}


// Logsパラメータ設定ダイアログ
function dialogFflogs() {
var message = "https://www.fflogs.com/reports/【???????/#fight=数字】\nの【】の部分を入力";
Expand Down
4 changes: 4 additions & 0 deletions main.gs
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,8 @@ function ViewLogをインポート() {

function Logsシートをリセット() {
new CreateLogsSheet();
}

function githubへ移動() {
Browser.msgBox(ERR_LINK_GITHUB, Browser.Buttons.OK);
}

0 comments on commit 797b359

Please # to comment.