Skip to content

Commit

Permalink
Fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
bbimber committed Aug 31, 2023
2 parents c39f04c + 3bf3453 commit 5064513
Show file tree
Hide file tree
Showing 137 changed files with 1,741 additions and 1,562 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,18 @@ jobs:
# Only generate the distribution if this is the default branch
GENERATE_DIST: ${{ env.DEFAULT_BRANCH == github.ref_name && '1' || '0' }}

- name: Publish Release
- name: Publish Latest Release
id: publish-release
if: ${{ env.DEFAULT_BRANCH == github.ref_name && github.event_name == 'push' && github.base_ref == '' }}
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.PAT }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build: ${{ env.DEFAULT_BRANCH }}"
files: /home/runner/work/_temp/_github_home/lkDist/discvr/DISCVR-*
env:
GH_TOKEN: "${{ secrets.PAT }}"
run: |
LK_VERSION=$(cat /home/runner/work/_temp/_github_home/lkDist/release.txt | sed 's/-SNAPSHOT//g')
cd /home/runner/work/_temp/_github_home/labkey_build/${LK_VERSION}/server/server/modules/DiscvrLabKeyModules
COUNT=$(gh release list | grep 'latest' | wc -l)
if [ $COUNT != '0' ];then gh release delete 'latest' --cleanup-tag -y; fi
git push -f origin "latest"
gh release create 'latest' --verify-tag --generate-notes --prerelease --title "Development Build: ${{ env.DEFAULT_BRANCH }}"
gh release upload 'latest' /home/runner/work/_temp/_github_home/lkDist/discvr/DISCVR-*
25 changes: 15 additions & 10 deletions .github/workflows/build_latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,18 @@ jobs:
env:
GENERATE_DIST: 1

# See: https://github.com/marketplace/actions/automatic-releases
- name: Deploy Build
if: ${{ env.DEFAULT_BRANCH == github.ref_name }}
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.PAT }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build: ${{ fromJson(steps.get_default_branch.outputs.data).default_branch }}"
files: /home/runner/work/_temp/_github_home/lkDist/discvr/DISCVR-*
- name: Publish Latest Release
id: publish-release
if: ${{ env.DEFAULT_BRANCH == github.ref_name && github.event_name == 'push' && github.base_ref == '' }}
env:
GH_TOKEN: "${{ secrets.PAT }}"
run: |
LK_VERSION=$(cat /home/runner/work/_temp/_github_home/lkDist/release.txt | sed 's/-SNAPSHOT//g')
cd /home/runner/work/_temp/_github_home/labkey_build/${LK_VERSION}/server/server/modules/DiscvrLabKeyModules
COUNT=$(gh release list | grep 'latest' | wc -l)
if [ $COUNT != '0' ];then gh release delete 'latest' --cleanup-tag -y; fi
git push -f origin "latest"
gh release create 'latest' --verify-tag --generate-notes --prerelease --title "Development Build: ${{ env.DEFAULT_BRANCH }}"
gh release upload 'latest' /home/runner/work/_temp/_github_home/lkDist/discvr/DISCVR-*
9 changes: 9 additions & 0 deletions QueryExtensions/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import org.labkey.gradle.util.BuildUtils

plugins {
id 'org.labkey.build.module'
}

dependencies {
BuildUtils.addLabKeyDependency(project: project, config: "modules", depProjectPath: ":server:modules:DiscvrLabKeyModules:discvrcore", depProjectConfig: "published", depExtension: "module")
}
5 changes: 5 additions & 0 deletions QueryExtensions/module.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ModuleClass: org.labkey.queryextensions.QueryExtensionsModule
Label: Query Extensions
Description: This module contains low-level extensions to the LabKey Query layer
License: Apache 2.0
LicenseURL: http://www.apache.org/licenses/LICENSE-2.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2023 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

-- Create schema, tables, indexes, and constraints used for QueryExtensions module here
-- All SQL VIEW definitions should be created in queryextensions-create.sql and dropped in queryextensions-drop.sql
CREATE SCHEMA queryextensions;
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright (c) 2023 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

-- Create schema, tables, indexes, and constraints used for QueryExtensions module here
-- All SQL VIEW definitions should be created in queryextensions-create.sql and dropped in queryextensions-drop.sql
CREATE SCHEMA queryextensions;
GO
20 changes: 20 additions & 0 deletions QueryExtensions/resources/schemas/queryextensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
* Copyright (c) 2023 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<tables xsi:schemaLocation="http://labkey.org/data/xml ..\..\..\..\schemas\tableInfo.xsd"
xmlns="http://labkey.org/data/xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright (c) 2023 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.labkey.queryextensions;

import org.labkey.api.action.SimpleViewAction;
import org.labkey.api.action.SpringActionController;
import org.labkey.api.security.RequiresPermission;
import org.labkey.api.security.permissions.ReadPermission;
import org.labkey.api.view.JspView;
import org.labkey.api.view.NavTree;
import org.springframework.validation.BindException;
import org.springframework.web.servlet.ModelAndView;

public class QueryExtensionsController extends SpringActionController
{
private static final DefaultActionResolver _actionResolver = new DefaultActionResolver(QueryExtensionsController.class);
public static final String NAME = "queryextensions";

public QueryExtensionsController()
{
setActionResolver(_actionResolver);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (c) 2023 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.labkey.queryextensions;

public class QueryExtensionsManager
{
private static final QueryExtensionsManager _instance = new QueryExtensionsManager();

private QueryExtensionsManager()
{

}

public static QueryExtensionsManager get()
{
return _instance;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*
* Copyright (c) 2023 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.labkey.queryextensions;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.labkey.api.data.Container;
import org.labkey.api.module.DefaultModule;
import org.labkey.api.module.ModuleContext;
import org.labkey.api.view.WebPartFactory;

import java.util.Collection;
import java.util.Collections;
import java.util.Set;

public class QueryExtensionsModule extends DefaultModule
{
public static final String NAME = "QueryExtensions";

@Override
public String getName()
{
return NAME;
}

@Override
public @Nullable Double getSchemaVersion()
{
return 23.000;
}

@Override
public boolean hasScripts()
{
return true;
}

@Override
@NotNull
protected Collection<WebPartFactory> createWebPartFactories()
{
return Collections.emptyList();
}

@Override
protected void init()
{
addController(QueryExtensionsController.NAME, QueryExtensionsController.class);
}

@Override
public void doStartup(ModuleContext moduleContext)
{

}

@Override
@NotNull
public Collection<String> getSummary(Container c)
{
return Collections.emptyList();
}

@Override
@NotNull
public Set<String> getSchemaNames()
{
return Collections.singleton(QueryExtensionsSchema.NAME);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Copyright (c) 2023 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.labkey.queryextensions;

import org.labkey.api.data.DbSchema;
import org.labkey.api.data.DbSchemaType;
import org.labkey.api.data.dialect.SqlDialect;

public class QueryExtensionsSchema
{
private static final QueryExtensionsSchema _instance = new QueryExtensionsSchema();
public static final String NAME = "queryextensions";

public static QueryExtensionsSchema getInstance()
{
return _instance;
}

private QueryExtensionsSchema()
{
// private constructor to prevent instantiation from
// outside this class: this singleton should only be
// accessed via org.labkey.queryextensions.QueryExtensionsSchema.getInstance()
}

public DbSchema getSchema()
{
return DbSchema.get(NAME, DbSchemaType.Module);
}

public SqlDialect getSqlDialect()
{
return getSchema().getSqlDialect();
}
}
Loading

0 comments on commit 5064513

Please sign in to comment.