Exemple #1
0
        private void OnEnable()
        {
            if (string.IsNullOrEmpty(_releaseParameter.BranchName))
            {
                _releaseParameter.BranchName = EditorUserSettings.GetConfigValue(GetSaveKey(SaveKeyType.Branch));
            }

            if (string.IsNullOrEmpty(_releaseParameter.TagName))
            {
                _releaseParameter.TagName = EditorUserSettings.GetConfigValue(GetSaveKey(SaveKeyType.TagName));
            }

            if (string.IsNullOrEmpty(_releaseParameter.UserName))
            {
                _releaseParameter.UserName = EditorUserSettings.GetConfigValue(GetSaveKey(SaveKeyType.UserName));
            }


            if (string.IsNullOrEmpty(_releaseParameter.TokenValue))
            {
                _releaseParameter.TokenValue = EditorUserSettings.GetConfigValue(GetSaveKey(SaveKeyType.Token));
            }


            if (_releaseSetting == null)
            {
                _releaseSetting       = Utility.FindAssetFromType <ReleaseExecutorSetting>();
                _releaseSettingEditor = Editor.CreateEditor(_releaseSetting);
            }
        }
Exemple #2
0
        private void OnGUI()
        {
            _scrollPos = EditorGUILayout.BeginScrollView(_scrollPos);

            using (new EditorGUILayout.HorizontalScope())
            {
                GUILayout.Label("リリースタイプ");
                _executorType = (ExecutorType)EditorGUILayout.EnumPopup(_executorType);
            }

            using (new EditorGUILayout.HorizontalScope())
            {
                GUILayout.Label("ブランチ名");
                _releaseParameter.BranchName = EditorGUILayout.TextArea(_releaseParameter.BranchName);
            }

            using (new EditorGUILayout.HorizontalScope())
            {
                GUILayout.Label("タグ名");
                _releaseParameter.TagName = EditorGUILayout.TextArea(_releaseParameter.TagName);
            }

            using (new EditorGUILayout.HorizontalScope())
            {
                GUILayout.Label("Githubユーザー名");
                _releaseParameter.UserName = EditorGUILayout.TextArea(_releaseParameter.UserName);
            }

            using (new EditorGUILayout.HorizontalScope())
            {
                GUILayout.Label("Githubトークン");
                _releaseParameter.TokenValue = EditorGUILayout.TextArea(_releaseParameter.TokenValue);
            }

            using (new EditorGUILayout.HorizontalScope())
            {
                GUILayout.Label("リリース設定");
                var setting = EditorGUILayout.ObjectField(_releaseSetting, typeof(ReleaseExecutorSetting), false) as ReleaseExecutorSetting;
                if (setting != _releaseSetting)
                {
                    _releaseSetting = setting;
                }
            }

            _releaseSettingEditor = Editor.CreateEditor(_releaseSetting);
            if (_releaseSettingEditor)
            {
                _releaseSettingEditor.OnInspectorGUI();
            }

            EditorGUILayout.EndScrollView();

            if (GUILayout.Button("リリース"))
            {
                Release();
            }
        }