Skip to content

Commit

Permalink
Merge branch 'release_23.1' into release_23.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Nov 29, 2023
2 parents 8874d69 + cd46ff3 commit 59d48ff
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
14 changes: 14 additions & 0 deletions client/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,20 @@ function buildPlugins(callback, forceRebuild) {
skipBuild = false;
} else {
if (fs.existsSync(hashFilePath)) {
const hashFileContent = fs.readFileSync(hashFilePath, "utf8").trim();
const isHash = /^[0-9a-f]{7,40}$/.test(hashFileContent); // Check for a 7 to 40 character hexadecimal string

if (!isHash) {
console.log(`Hash file for ${pluginName} exists but does not have a valid git hash.`);
skipBuild = false;
} else {
skipBuild =
child_process.spawnSync("git", ["diff", "--quiet", hashFileContent, "--", pluginDir], {
stdio: "inherit",
shell: true,
}).status === 0;
}

skipBuild =
child_process.spawnSync("git", ["diff", "--quiet", `$(cat ${hashFilePath})`, "--", pluginDir], {
stdio: "inherit",
Expand Down
9 changes: 8 additions & 1 deletion lib/galaxy/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,14 @@ def _process_config(self, kwargs: Dict[str, Any]) -> None:
self.install_database_engine_options = get_database_engine_options(kwargs, model_prefix="install_")
self.shared_home_dir = kwargs.get("shared_home_dir")
self.cookie_path = kwargs.get("cookie_path")
self.tool_path = self._in_root_dir(self.tool_path)
if not running_from_source and kwargs.get("tool_path") is None:
try:
self.tool_path = str(files("galaxy.tools") / "bundled")
except ModuleNotFoundError:
# Might not be a full galaxy installation
self.tool_path = self._in_root_dir(self.tool_path)
else:
self.tool_path = self._in_root_dir(self.tool_path)
self.tool_data_path = self._in_root_dir(self.tool_data_path)
if not running_from_source and kwargs.get("tool_data_path") is None:
self.tool_data_path = self._in_data_dir(self.schema.defaults["tool_data_path"])
Expand Down
3 changes: 2 additions & 1 deletion lib/galaxy/files/sources/s3fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def _realize_to(self, source_path, native_path, user_context=None, opts: Optiona
self._open_fs(user_context=user_context, opts=opts).download(bucket_path, native_path)

def _write_from(self, target_path, native_path, user_context=None, opts: Optional[FilesSourceOptions] = None):
raise NotImplementedError()
bucket_path = self._bucket_path(target_path)
self._open_fs(user_context=user_context, opts=opts).upload(native_path, bucket_path)

def _bucket_path(self, path: str):
if path.startswith("s3://"):
Expand Down
2 changes: 1 addition & 1 deletion packages/web_apps/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ install_requires =
galaxy-data
galaxy-job-execution
galaxy-tool-util
galaxy-util
galaxy-util[jstree,template]
galaxy-web-framework
galaxy-web-stack
a2wsgi
Expand Down

0 comments on commit 59d48ff

Please sign in to comment.