From 069fc1dfdc697acb9eb601444ce364b1d5e183c7 Mon Sep 17 00:00:00 2001 From: Safae Ajib Date: Wed, 26 Mar 2025 10:45:26 +0100 Subject: [PATCH 1/9] Issue #40: Rebrand Codebase from Sentry Software to MetricsHub * Updated SshClient.java --- .github/workflows/build.yml | 26 ++++++++++++++++-- .github/workflows/deploy.yml | 3 +- .github/workflows/release.yml | 3 +- pom.xml | 18 ++++++------ .../ssh/SshClient.java | 6 ++-- .../ssh/Utils.java | 4 +-- src/site/markdown/index.md | 8 +++--- .../resources/images/metricshub-logo-only.png | Bin 0 -> 6041 bytes .../resources/images/sentry-logo-179x75px.png | Bin 4321 -> 0 bytes src/site/site.xml | 4 +-- .../ssh/SSHClientTest.java | 2 +- 11 files changed, 49 insertions(+), 25 deletions(-) rename src/main/java/org/{sentrysoftware => metricshub}/ssh/SshClient.java (99%) rename src/main/java/org/{sentrysoftware => metricshub}/ssh/Utils.java (98%) create mode 100644 src/site/resources/images/metricshub-logo-only.png delete mode 100644 src/site/resources/images/sentry-logo-179x75px.png rename src/test/java/org/{sentrysoftware => metricshub}/ssh/SSHClientTest.java (99%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 55aed6a..c4c1930 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,8 +1,11 @@ name: Maven Build on: + # Run on all PRs to "main" (update to include the protected branches of your repository) pull_request: branches: [ "main" ] + + # Run the workflow manually workflow_dispatch: inputs: debug: @@ -15,11 +18,30 @@ on: description: Open SSH session in the runner required: false default: false - + uploadCheckstyleReport: + type: boolean + description: Upload Checkstyle report created by Maven + required: false + default: true + uploadPMDReport: + type: boolean + description: Upload PMD report created by Maven + required: false + default: true + uploadSpotbugsReport: + type: boolean + description: Upload Spotbugs report created by Maven + required: false + default: true + jobs: build: - uses: sentrysoftware/workflows/.github/workflows/maven-build.yml@v3 + uses: metricshub/workflows/.github/workflows/maven-build.yml@v1 with: jdkVersion: "17" + nodeVersion: "20.x" debug: ${{ github.event_name == 'workflow_dispatch' && inputs.debug }} ssh: ${{ github.event_name == 'workflow_dispatch' && inputs.ssh }} + uploadCheckstyleReport: ${{ inputs.uploadCheckstyleReport }} + uploadPMDReport: ${{ inputs.uploadPMDReport }} + uploadSpotbugsReport: ${{ inputs.uploadSpotbugsReport }} \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5a72abb..4056332 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,7 +10,8 @@ on: jobs: deploy: - uses: sentrysoftware/workflows/.github/workflows/maven-central-deploy.yml@v3 + uses: metricshub/workflows/.github/workflows/maven-central-deploy.yml@v1 with: jdkVersion: "17" + nodeVersion: "20.x" secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 14d640c..2afb794 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,10 +18,11 @@ on: jobs: release: - uses: sentrysoftware/workflows/.github/workflows/maven-central-release.yml@v3 + uses: metricshub/workflows/.github/workflows/maven-central-release.yml@v1 with: releaseVersion: ${{ inputs.releaseVersion }} developmentVersion: ${{ inputs.developmentVersion }} autoRelease: false jdkVersion: "17" + nodeVersion: "20.x" secrets: inherit diff --git a/pom.xml b/pom.xml index c454762..06f8bd9 100644 --- a/pom.xml +++ b/pom.xml @@ -2,23 +2,23 @@ 4.0.0 - org.sentrysoftware + org.metricshub oss-parent 2 - org.sentrysoftware - ssh + org.metricshub + ssh-java SSH Java Client 1.0.03-SNAPSHOT SSH Cilent Library for Java - Sentry Software - https://sentrysoftware.com + MetricsHub + https://metricsHub.com - https://sentrysoftware.org/ssh + https://metricsHub.org/ssh 2023 @@ -31,12 +31,12 @@ GitHub - https://github.com/sentrysoftware/ssh/issues/ + https://github.com/metricsHub/ssh/issues/ - scm:git:https://github.com/sentrysoftware/ssh.git - https://github.com/sentrysoftware/ssh + scm:git:https://github.com/metricsHub/ssh.git + https://github.com/metricsHub/ssh HEAD diff --git a/src/main/java/org/sentrysoftware/ssh/SshClient.java b/src/main/java/org/metricshub/ssh/SshClient.java similarity index 99% rename from src/main/java/org/sentrysoftware/ssh/SshClient.java rename to src/main/java/org/metricshub/ssh/SshClient.java index 1ac77cd..6b5dc4d 100644 --- a/src/main/java/org/sentrysoftware/ssh/SshClient.java +++ b/src/main/java/org/metricshub/ssh/SshClient.java @@ -3,13 +3,13 @@ * and open the template in the editor. */ -package org.sentrysoftware.ssh; +package org.metricshub.ssh; /*- * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ * SSH Java Client * ჻჻჻჻჻჻ - * Copyright (C) 2023 Sentry Software + * Copyright (C) 2023 Metricshub * ჻჻჻჻჻჻ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -515,7 +515,7 @@ public String readFile(String remoteFilePath, Long readOffset, Integer readSize) // Close the SFTP client sftpClient.close(); - // Sentry Collection format + // Metricshub Collection format return out.toString(); } diff --git a/src/main/java/org/sentrysoftware/ssh/Utils.java b/src/main/java/org/metricshub/ssh/Utils.java similarity index 98% rename from src/main/java/org/sentrysoftware/ssh/Utils.java rename to src/main/java/org/metricshub/ssh/Utils.java index 18a689f..b22c6ac 100644 --- a/src/main/java/org/sentrysoftware/ssh/Utils.java +++ b/src/main/java/org/metricshub/ssh/Utils.java @@ -1,10 +1,10 @@ -package org.sentrysoftware.ssh; +package org.metricshub.ssh; /*- * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ * SSH Java Client * ჻჻჻჻჻჻ - * Copyright 2023 Sentry Software + * Copyright 2023 Metricshub * ჻჻჻჻჻჻ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md index 62dc0d6..1103aed 100644 --- a/src/site/markdown/index.md +++ b/src/site/markdown/index.md @@ -15,7 +15,7 @@ Add SSH in the list of dependencies in your [Maven **pom.xml**](https://maven.ap - org.sentrysoftware + org.metricshub ssh ${project.version} @@ -29,9 +29,9 @@ import java.io.File; import java.io.IOException; import java.nio.charset.Charset; -import org.sentrysoftware.ssh.SshClient; -import org.sentrysoftware.ssh.Utils; -import org.sentrysoftware.ssh.SshClient.CommandResult; +import org.metricshub.ssh.SshClient; +import org.metricshub.ssh.Utils; +import org.metricshub.ssh.SshClient.CommandResult; public class Main { diff --git a/src/site/resources/images/metricshub-logo-only.png b/src/site/resources/images/metricshub-logo-only.png new file mode 100644 index 0000000000000000000000000000000000000000..89d6fb80d559b54044abd03ee658ddcc6a77ca3f GIT binary patch literal 6041 zcmV;K7iQ>*P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf4*&oQ4*`<-1El}}7cNOeK~#8N?VSsJ zRMnlw|L2^0=aDCG3I?bp21JE~NU^n*DxkC$3`kttTBY4>wc6TkeN{y!0kw5^Tl#Qo z)#`57^695)2|gpeC{XV zKaZSy&+q=v|9@T=3KS?%pg@5F1qu`>FmRar^OT|mYKu+-HQfgLTn>C3nod)oG&~(T zpAYc&ogCmz4#7Ws1YSSre8^)yw_(9J1K^2VmJ>8P!^U}b(fd{(-@$zz>b-n(uTL0gvS*aE7qR- z>~8l>zUGt=(JnY=unyWSI$r51;dpBJehA?a1DmRCr3u!O3fS_t z`<9$C>y5e@Jjjdeb?EV)%_d?u# zmoM?Xh~9yz=Y;@%Q3iZUCyFMH0?HKhT2O+rih(@X1?rYDu<0@PrR<}C&E7PBG1K`S zBCLh%C`vt*aC$+Y$6^{s?_@o1c646<^7+s2a$oWtz829QsICtI|Mwv9;q6YNH86@$ zNH+eAgSGTD*c?e%vqx>q=Zl7jzyo@TezhI9(fedB_>;g8PcPHKJQjabGF7*(dewIK z6<>kzr$2cIsy`b5{up|Z;m5KdAObxR{!@Ul)RNsW;d!%dbH?ua+KaU5*Vi`w2XJ=P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UuF_~Z#sy3A9AlZpt0!Su7+$wk=vJzpZ1;XM4hjdI|=Hf)mR-^xEO7OyYL>e&zIr3mebiYedG?bB_I?=8VAk86sLfti^O>}=dL7C;kADEy@o_W;yE>YIY1hlp zLW<(*b!gHEl#4=**}j~UxY&gsuCm|*Zin^`pFXO?s6a!O4YcswYvW_R| z1kw8V%kO%W2yyfvt8w!C*!8-sH_`ss*T&33vr+1hZlUbHe739yx=F;_Ag0{!LMc2w zL+08n-*E3&B3f$Jl5@lG-mauc+}n)5Zs%$UH7`x6 zhVrxn&B?r42A@aE;_ChN0-qfy<6flR@o$(qFR33>y&h1Trrtp6!PUcSjIYB215p-w zg@ewIoz!2hUMnMm&QKQAa1=7j$)QwYw=@k>2ZQ9$s9Juvr zF1>mpbxxh|=m8K@4~}{baq9M0!rJoy7>8fF79?~gtorRkZHGF%g|R=s;HLh_$I@#o zIEo9Z_rYn?jHcyM8w_dmAfwx_zECyXv(P}K-E4Zzu9nmXp^igcHH6cVtLW4_e&aDT zq`AgfwMlO*EN}dc_V33XNU;bA39ycHPpW_NT*p)CQUsx zQ;^=*s|5;oDx}@;p*7pED{9H!5%SaZ(EC9&PWzaAuR)p1;>6bzxMnuAvrywhJxJ*m zeh*5$O{zSkzr7e?9Yk)p_8J=Kv`O_Fpi-f%BQZviMz6_okk7HWhoQtb2obK&G@JU} z8~7}QFpZyk5ti7q6TUb3&I;>@Ti51rbQfuKz@Y-_r*XYHhxj$qbBrEf%ZCc;Ri#s? zL|dWEiKv}t6FrLqG^!0y#TzWkgtGK+Rz;6Rc|7@`arLB~or78UfB*7A-g@VprUpB4 zjLWmQL1X(o8jT9Syd@2?(%X*oWUL8wkEgxR@bq^M+H9juI1NEs{a?w&$p4w8CzF=# z0Z4;}sF@DU4(P8Q^ma})%w9a - images/sentry-logo-179x75px.png - https://sentrysoftware.com + images/metricshub-logo-only.png + https://metricsHub.com diff --git a/src/test/java/org/sentrysoftware/ssh/SSHClientTest.java b/src/test/java/org/metricshub/ssh/SSHClientTest.java similarity index 99% rename from src/test/java/org/sentrysoftware/ssh/SSHClientTest.java rename to src/test/java/org/metricshub/ssh/SSHClientTest.java index 93f6631..a8bc3fe 100644 --- a/src/test/java/org/sentrysoftware/ssh/SSHClientTest.java +++ b/src/test/java/org/metricshub/ssh/SSHClientTest.java @@ -1,4 +1,4 @@ -package org.sentrysoftware.ssh; +package org.metricshub.ssh; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; From 48d58b3eac365ae2b80925141d9cf8bcfb576008 Mon Sep 17 00:00:00 2001 From: Safae Ajib Date: Wed, 26 Mar 2025 11:25:41 +0100 Subject: [PATCH 2/9] Issue #40: Rebrand Codebase from Sentry Software to MetricsHub * Updated build.yml, deploy.yml and release.yml --- .github/workflows/build.yml | 24 +-- .github/workflows/deploy.yml | 1 - .github/workflows/release.yml | 1 - "afae@sentrysoftware.com\357\200\276" | 298 ++++++++++++++++++++++++++ 4 files changed, 299 insertions(+), 25 deletions(-) create mode 100644 "afae@sentrysoftware.com\357\200\276" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c4c1930..1a5b585 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,11 +1,8 @@ name: Maven Build on: - # Run on all PRs to "main" (update to include the protected branches of your repository) pull_request: branches: [ "main" ] - - # Run the workflow manually workflow_dispatch: inputs: debug: @@ -18,22 +15,6 @@ on: description: Open SSH session in the runner required: false default: false - uploadCheckstyleReport: - type: boolean - description: Upload Checkstyle report created by Maven - required: false - default: true - uploadPMDReport: - type: boolean - description: Upload PMD report created by Maven - required: false - default: true - uploadSpotbugsReport: - type: boolean - description: Upload Spotbugs report created by Maven - required: false - default: true - jobs: build: uses: metricshub/workflows/.github/workflows/maven-build.yml@v1 @@ -41,7 +22,4 @@ jobs: jdkVersion: "17" nodeVersion: "20.x" debug: ${{ github.event_name == 'workflow_dispatch' && inputs.debug }} - ssh: ${{ github.event_name == 'workflow_dispatch' && inputs.ssh }} - uploadCheckstyleReport: ${{ inputs.uploadCheckstyleReport }} - uploadPMDReport: ${{ inputs.uploadPMDReport }} - uploadSpotbugsReport: ${{ inputs.uploadSpotbugsReport }} \ No newline at end of file + ssh: ${{ github.event_name == 'workflow_dispatch' && inputs.ssh }} \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4056332..d72efca 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,5 +13,4 @@ jobs: uses: metricshub/workflows/.github/workflows/maven-central-deploy.yml@v1 with: jdkVersion: "17" - nodeVersion: "20.x" secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2afb794..117de28 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,5 +24,4 @@ jobs: developmentVersion: ${{ inputs.developmentVersion }} autoRelease: false jdkVersion: "17" - nodeVersion: "20.x" secrets: inherit diff --git "a/afae@sentrysoftware.com\357\200\276" "b/afae@sentrysoftware.com\357\200\276" new file mode 100644 index 0000000..901a11c --- /dev/null +++ "b/afae@sentrysoftware.com\357\200\276" @@ -0,0 +1,298 @@ + + SSUUMMMMAARRYY OOFF LLEESSSS CCOOMMMMAANNDDSS + + Commands marked with * may be preceded by a number, _N. + Notes in parentheses indicate the behavior if _N is given. + A key preceded by a caret indicates the Ctrl key; thus ^K is ctrl-K. + + h H Display this help. + q :q Q :Q ZZ Exit. + --------------------------------------------------------------------------- + + MMOOVVIINNGG + + e ^E j ^N CR * Forward one line (or _N lines). + y ^Y k ^K ^P * Backward one line (or _N lines). + f ^F ^V SPACE * Forward one window (or _N lines). + b ^B ESC-v * Backward one window (or _N lines). + z * Forward one window (and set window to _N). + w * Backward one window (and set window to _N). + ESC-SPACE * Forward one window, but don't stop at end-of-file. + d ^D * Forward one half-window (and set half-window to _N). + u ^U * Backward one half-window (and set half-window to _N). + ESC-) RightArrow * Right one half screen width (or _N positions). + ESC-( LeftArrow * Left one half screen width (or _N positions). + ESC-} ^RightArrow Right to last column displayed. + ESC-{ ^LeftArrow Left to first column. + F Forward forever; like "tail -f". + ESC-F Like F but stop when search pattern is found. + r ^R ^L Repaint screen. + R Repaint screen, discarding buffered input. + --------------------------------------------------- + Default "window" is the screen height. + Default "half-window" is half of the screen height. + --------------------------------------------------------------------------- + + SSEEAARRCCHHIINNGG + + /_p_a_t_t_e_r_n * Search forward for (_N-th) matching line. + ?_p_a_t_t_e_r_n * Search backward for (_N-th) matching line. + n * Repeat previous search (for _N-th occurrence). + N * Repeat previous search in reverse direction. + ESC-n * Repeat previous search, spanning files. + ESC-N * Repeat previous search, reverse dir. & spanning files. + ESC-u Undo (toggle) search highlighting. + ESC-U Clear search highlighting. + &_p_a_t_t_e_r_n * Display only matching lines. + --------------------------------------------------- + A search pattern may begin with one or more of: + ^N or ! Search for NON-matching lines. + ^E or * Search multiple files (pass thru END OF FILE). + ^F or @ Start search at FIRST file (for /) or last file (for ?). + ^K Highlight matches, but don't move (KEEP position). + ^R Don't use REGULAR EXPRESSIONS. + ^S _n Search for match in _n-th parenthesized subpattern. + ^W WRAP search if no match found. + --------------------------------------------------------------------------- + + JJUUMMPPIINNGG + + g < ESC-< * Go to first line in file (or line _N). + G > ESC-> * Go to last line in file (or line _N). + p % * Go to beginning of file (or _N percent into file). + t * Go to the (_N-th) next tag. + T * Go to the (_N-th) previous tag. + { ( [ * Find close bracket } ) ]. + } ) ] * Find open bracket { ( [. + ESC-^F _<_c_1_> _<_c_2_> * Find close bracket _<_c_2_>. + ESC-^B _<_c_1_> _<_c_2_> * Find open bracket _<_c_1_>. + --------------------------------------------------- + Each "find close bracket" command goes forward to the close bracket + matching the (_N-th) open bracket in the top line. + Each "find open bracket" command goes backward to the open bracket + matching the (_N-th) close bracket in the bottom line. + + m_<_l_e_t_t_e_r_> Mark the current top line with . + M_<_l_e_t_t_e_r_> Mark the current bottom line with . + '_<_l_e_t_t_e_r_> Go to a previously marked position. + '' Go to the previous position. + ^X^X Same as '. + ESC-m_<_l_e_t_t_e_r_> Clear a mark. + --------------------------------------------------- + A mark is any upper-case or lower-case letter. + Certain marks are predefined: + ^ means beginning of the file + $ means end of the file + --------------------------------------------------------------------------- + + CCHHAANNGGIINNGG FFIILLEESS + + :e [_f_i_l_e] Examine a new file. + ^X^V Same as :e. + :n * Examine the (_N-th) next file from the command line. + :p * Examine the (_N-th) previous file from the command line. + :x * Examine the first (or _N-th) file from the command line. + :d Delete the current file from the command line list. + = ^G :f Print current file name. + --------------------------------------------------------------------------- + + MMIISSCCEELLLLAANNEEOOUUSS CCOOMMMMAANNDDSS + + -_<_f_l_a_g_> Toggle a command line option [see OPTIONS below]. + --_<_n_a_m_e_> Toggle a command line option, by name. + __<_f_l_a_g_> Display the setting of a command line option. + ___<_n_a_m_e_> Display the setting of an option, by name. + +_c_m_d Execute the less cmd each time a new file is examined. + + !_c_o_m_m_a_n_d Execute the shell command with $SHELL. + #_c_o_m_m_a_n_d Execute the shell command, expanded like a prompt. + |XX_c_o_m_m_a_n_d Pipe file between current pos & mark XX to shell command. + s _f_i_l_e Save input to a file. + v Edit the current file with $VISUAL or $EDITOR. + V Print version number of "less". + --------------------------------------------------------------------------- + + OOPPTTIIOONNSS + + Most options may be changed either on the command line, + or from within less by using the - or -- command. + Options may be given in one of two forms: either a single + character preceded by a -, or a name preceded by --. + + -? ........ --help + Display help (from command line). + -a ........ --search-skip-screen + Search skips current screen. + -A ........ --SEARCH-SKIP-SCREEN + Search starts just after target line. + -b [_N] .... --buffers=[_N] + Number of buffers. + -B ........ --auto-buffers + Don't automatically allocate buffers for pipes. + -c ........ --clear-screen + Repaint by clearing rather than scrolling. + -d ........ --dumb + Dumb terminal. + -D xx_c_o_l_o_r . --color=xx_c_o_l_o_r + Set screen colors. + -e -E .... --quit-at-eof --QUIT-AT-EOF + Quit at end of file. + -f ........ --force + Force open non-regular files. + -F ........ --quit-if-one-screen + Quit if entire file fits on first screen. + -g ........ --hilite-search + Highlight only last match for searches. + -G ........ --HILITE-SEARCH + Don't highlight any matches for searches. + -h [_N] .... --max-back-scroll=[_N] + Backward scroll limit. + -i ........ --ignore-case + Ignore case in searches that do not contain uppercase. + -I ........ --IGNORE-CASE + Ignore case in all searches. + -j [_N] .... --jump-target=[_N] + Screen position of target lines. + -J ........ --status-column + Display a status column at left edge of screen. + -k [_f_i_l_e] . --lesskey-file=[_f_i_l_e] + Use a lesskey file. + -K ........ --quit-on-intr + Exit less in response to ctrl-C. + -L ........ --no-lessopen + Ignore the LESSOPEN environment variable. + -m -M .... --long-prompt --LONG-PROMPT + Set prompt style. + -n ......... --line-numbers + Suppress line numbers in prompts and messages. + -N ......... --LINE-NUMBERS + Display line number at start of each line. + -o [_f_i_l_e] . --log-file=[_f_i_l_e] + Copy to log file (standard input only). + -O [_f_i_l_e] . --LOG-FILE=[_f_i_l_e] + Copy to log file (unconditionally overwrite). + -p [_p_a_t_t_e_r_n] --pattern=[_p_a_t_t_e_r_n] + Start at pattern (from command line). + -P [_p_r_o_m_p_t] --prompt=[_p_r_o_m_p_t] + Define new prompt. + -q -Q .... --quiet --QUIET --silent --SILENT + Quiet the terminal bell. + -r -R .... --raw-control-chars --RAW-CONTROL-CHARS + Output "raw" control characters. + -s ........ --squeeze-blank-lines + Squeeze multiple blank lines. + -S ........ --chop-long-lines + Chop (truncate) long lines rather than wrapping. + -t [_t_a_g] .. --tag=[_t_a_g] + Find a tag. + -T [_t_a_g_s_f_i_l_e] --tag-file=[_t_a_g_s_f_i_l_e] + Use an alternate tags file. + -u -U .... --underline-special --UNDERLINE-SPECIAL + Change handling of backspaces, tabs and carriage returns. + -V ........ --version + Display the version number of "less". + -w ........ --hilite-unread + Highlight first new line after forward-screen. + -W ........ --HILITE-UNREAD + Highlight first new line after any forward movement. + -x [_N[,...]] --tabs=[_N[,...]] + Set tab stops. + -X ........ --no-init + Don't use termcap init/deinit strings. + -y [_N] .... --max-forw-scroll=[_N] + Forward scroll limit. + -z [_N] .... --window=[_N] + Set size of window. + -" [_c[_c]] . --quotes=[_c[_c]] + Set shell quote characters. + -~ ........ --tilde + Don't display tildes after end of file. + -# [_N] .... --shift=[_N] + Set horizontal scroll amount (0 = one half screen width). + --exit-follow-on-close + Exit F command on a pipe when writer closes pipe. + --file-size + Automatically determine the size of the input file. + --follow-name + The F command changes files if the input file is renamed. + --header=[_N[,_M]] + Use N lines and M columns to display file headers. + --incsearch + Search file as each pattern character is typed in. + --intr=_C + Use _C instead of ^X to interrupt a read. + --line-num-width=_N + Set the width of the -N line number field to _N characters. + --modelines=_N + Read _N lines from the input file and look for vim modelines. + --mouse + Enable mouse input. + --no-keypad + Don't send termcap keypad init/deinit strings. + --no-histdups + Remove duplicates from command history. + --no-number-headers + Don't give line numbers to header lines. + --no-search-headers + Don't search in header lines or columns. + --no-vbell + Disable the terminal's visual bell. + --redraw-on-quit + Redraw final screen when quitting. + --rscroll=_C + Set the character used to mark truncated lines. + --save-marks + Retain marks across invocations of less. + --search-options=[EFKNRW-] + Set default options for every search. + --show-preproc-errors + Display a message if preprocessor exits with an error status. + --proc-backspace + Process backspaces for bold/underline. + --SPECIAL-BACKSPACE + Treat backspaces as control characters. + --proc-return + Delete carriage returns before newline. + --SPECIAL-RETURN + Treat carriage returns as control characters. + --proc-tab + Expand tabs to spaces. + --SPECIAL-TAB + Treat tabs as control characters. + --status-col-width=_N + Set the width of the -J status column to _N characters. + --status-line + Highlight or color the entire line containing a mark. + --use-backslash + Subsequent options use backslash as escape char. + --use-color + Enables colored text. + --wheel-lines=_N + Each click of the mouse wheel moves _N lines. + --wordwrap + Wrap lines at spaces. + + + --------------------------------------------------------------------------- + + LLIINNEE EEDDIITTIINNGG + + These keys can be used to edit text being entered + on the "command line" at the bottom of the screen. + + RightArrow ..................... ESC-l ... Move cursor right one character. + LeftArrow ...................... ESC-h ... Move cursor left one character. + ctrl-RightArrow ESC-RightArrow ESC-w ... Move cursor right one word. + ctrl-LeftArrow ESC-LeftArrow ESC-b ... Move cursor left one word. + HOME ........................... ESC-0 ... Move cursor to start of line. + END ............................ ESC-$ ... Move cursor to end of line. + BACKSPACE ................................ Delete char to left of cursor. + DELETE ......................... ESC-x ... Delete char under cursor. + ctrl-BACKSPACE ESC-BACKSPACE ........... Delete word to left of cursor. + ctrl-DELETE .... ESC-DELETE .... ESC-X ... Delete word under cursor. + ctrl-U ......... ESC (MS-DOS only) ....... Delete entire line. + UpArrow ........................ ESC-k ... Retrieve previous command line. + DownArrow ...................... ESC-j ... Retrieve next command line. + TAB ...................................... Complete filename & cycle. + SHIFT-TAB ...................... ESC-TAB Complete filename & reverse cycle. + ctrl-L ................................... Complete filename, list all. From 70853fdbb9ab25c05eb40a43c4a07f207b0e9cd5 Mon Sep 17 00:00:00 2001 From: Safae Ajib Date: Wed, 26 Mar 2025 11:27:22 +0100 Subject: [PATCH 3/9] Issue #40: Rebrand Codebase from Sentry Software to MetricsHub * Updated build.yml --- .github/workflows/build.yml | 1 + "afae@sentrysoftware.com\357\200\276" | 298 -------------------------- 2 files changed, 1 insertion(+), 298 deletions(-) delete mode 100644 "afae@sentrysoftware.com\357\200\276" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1a5b585..6f18438 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,6 +15,7 @@ on: description: Open SSH session in the runner required: false default: false + jobs: build: uses: metricshub/workflows/.github/workflows/maven-build.yml@v1 diff --git "a/afae@sentrysoftware.com\357\200\276" "b/afae@sentrysoftware.com\357\200\276" deleted file mode 100644 index 901a11c..0000000 --- "a/afae@sentrysoftware.com\357\200\276" +++ /dev/null @@ -1,298 +0,0 @@ - - SSUUMMMMAARRYY OOFF LLEESSSS CCOOMMMMAANNDDSS - - Commands marked with * may be preceded by a number, _N. - Notes in parentheses indicate the behavior if _N is given. - A key preceded by a caret indicates the Ctrl key; thus ^K is ctrl-K. - - h H Display this help. - q :q Q :Q ZZ Exit. - --------------------------------------------------------------------------- - - MMOOVVIINNGG - - e ^E j ^N CR * Forward one line (or _N lines). - y ^Y k ^K ^P * Backward one line (or _N lines). - f ^F ^V SPACE * Forward one window (or _N lines). - b ^B ESC-v * Backward one window (or _N lines). - z * Forward one window (and set window to _N). - w * Backward one window (and set window to _N). - ESC-SPACE * Forward one window, but don't stop at end-of-file. - d ^D * Forward one half-window (and set half-window to _N). - u ^U * Backward one half-window (and set half-window to _N). - ESC-) RightArrow * Right one half screen width (or _N positions). - ESC-( LeftArrow * Left one half screen width (or _N positions). - ESC-} ^RightArrow Right to last column displayed. - ESC-{ ^LeftArrow Left to first column. - F Forward forever; like "tail -f". - ESC-F Like F but stop when search pattern is found. - r ^R ^L Repaint screen. - R Repaint screen, discarding buffered input. - --------------------------------------------------- - Default "window" is the screen height. - Default "half-window" is half of the screen height. - --------------------------------------------------------------------------- - - SSEEAARRCCHHIINNGG - - /_p_a_t_t_e_r_n * Search forward for (_N-th) matching line. - ?_p_a_t_t_e_r_n * Search backward for (_N-th) matching line. - n * Repeat previous search (for _N-th occurrence). - N * Repeat previous search in reverse direction. - ESC-n * Repeat previous search, spanning files. - ESC-N * Repeat previous search, reverse dir. & spanning files. - ESC-u Undo (toggle) search highlighting. - ESC-U Clear search highlighting. - &_p_a_t_t_e_r_n * Display only matching lines. - --------------------------------------------------- - A search pattern may begin with one or more of: - ^N or ! Search for NON-matching lines. - ^E or * Search multiple files (pass thru END OF FILE). - ^F or @ Start search at FIRST file (for /) or last file (for ?). - ^K Highlight matches, but don't move (KEEP position). - ^R Don't use REGULAR EXPRESSIONS. - ^S _n Search for match in _n-th parenthesized subpattern. - ^W WRAP search if no match found. - --------------------------------------------------------------------------- - - JJUUMMPPIINNGG - - g < ESC-< * Go to first line in file (or line _N). - G > ESC-> * Go to last line in file (or line _N). - p % * Go to beginning of file (or _N percent into file). - t * Go to the (_N-th) next tag. - T * Go to the (_N-th) previous tag. - { ( [ * Find close bracket } ) ]. - } ) ] * Find open bracket { ( [. - ESC-^F _<_c_1_> _<_c_2_> * Find close bracket _<_c_2_>. - ESC-^B _<_c_1_> _<_c_2_> * Find open bracket _<_c_1_>. - --------------------------------------------------- - Each "find close bracket" command goes forward to the close bracket - matching the (_N-th) open bracket in the top line. - Each "find open bracket" command goes backward to the open bracket - matching the (_N-th) close bracket in the bottom line. - - m_<_l_e_t_t_e_r_> Mark the current top line with . - M_<_l_e_t_t_e_r_> Mark the current bottom line with . - '_<_l_e_t_t_e_r_> Go to a previously marked position. - '' Go to the previous position. - ^X^X Same as '. - ESC-m_<_l_e_t_t_e_r_> Clear a mark. - --------------------------------------------------- - A mark is any upper-case or lower-case letter. - Certain marks are predefined: - ^ means beginning of the file - $ means end of the file - --------------------------------------------------------------------------- - - CCHHAANNGGIINNGG FFIILLEESS - - :e [_f_i_l_e] Examine a new file. - ^X^V Same as :e. - :n * Examine the (_N-th) next file from the command line. - :p * Examine the (_N-th) previous file from the command line. - :x * Examine the first (or _N-th) file from the command line. - :d Delete the current file from the command line list. - = ^G :f Print current file name. - --------------------------------------------------------------------------- - - MMIISSCCEELLLLAANNEEOOUUSS CCOOMMMMAANNDDSS - - -_<_f_l_a_g_> Toggle a command line option [see OPTIONS below]. - --_<_n_a_m_e_> Toggle a command line option, by name. - __<_f_l_a_g_> Display the setting of a command line option. - ___<_n_a_m_e_> Display the setting of an option, by name. - +_c_m_d Execute the less cmd each time a new file is examined. - - !_c_o_m_m_a_n_d Execute the shell command with $SHELL. - #_c_o_m_m_a_n_d Execute the shell command, expanded like a prompt. - |XX_c_o_m_m_a_n_d Pipe file between current pos & mark XX to shell command. - s _f_i_l_e Save input to a file. - v Edit the current file with $VISUAL or $EDITOR. - V Print version number of "less". - --------------------------------------------------------------------------- - - OOPPTTIIOONNSS - - Most options may be changed either on the command line, - or from within less by using the - or -- command. - Options may be given in one of two forms: either a single - character preceded by a -, or a name preceded by --. - - -? ........ --help - Display help (from command line). - -a ........ --search-skip-screen - Search skips current screen. - -A ........ --SEARCH-SKIP-SCREEN - Search starts just after target line. - -b [_N] .... --buffers=[_N] - Number of buffers. - -B ........ --auto-buffers - Don't automatically allocate buffers for pipes. - -c ........ --clear-screen - Repaint by clearing rather than scrolling. - -d ........ --dumb - Dumb terminal. - -D xx_c_o_l_o_r . --color=xx_c_o_l_o_r - Set screen colors. - -e -E .... --quit-at-eof --QUIT-AT-EOF - Quit at end of file. - -f ........ --force - Force open non-regular files. - -F ........ --quit-if-one-screen - Quit if entire file fits on first screen. - -g ........ --hilite-search - Highlight only last match for searches. - -G ........ --HILITE-SEARCH - Don't highlight any matches for searches. - -h [_N] .... --max-back-scroll=[_N] - Backward scroll limit. - -i ........ --ignore-case - Ignore case in searches that do not contain uppercase. - -I ........ --IGNORE-CASE - Ignore case in all searches. - -j [_N] .... --jump-target=[_N] - Screen position of target lines. - -J ........ --status-column - Display a status column at left edge of screen. - -k [_f_i_l_e] . --lesskey-file=[_f_i_l_e] - Use a lesskey file. - -K ........ --quit-on-intr - Exit less in response to ctrl-C. - -L ........ --no-lessopen - Ignore the LESSOPEN environment variable. - -m -M .... --long-prompt --LONG-PROMPT - Set prompt style. - -n ......... --line-numbers - Suppress line numbers in prompts and messages. - -N ......... --LINE-NUMBERS - Display line number at start of each line. - -o [_f_i_l_e] . --log-file=[_f_i_l_e] - Copy to log file (standard input only). - -O [_f_i_l_e] . --LOG-FILE=[_f_i_l_e] - Copy to log file (unconditionally overwrite). - -p [_p_a_t_t_e_r_n] --pattern=[_p_a_t_t_e_r_n] - Start at pattern (from command line). - -P [_p_r_o_m_p_t] --prompt=[_p_r_o_m_p_t] - Define new prompt. - -q -Q .... --quiet --QUIET --silent --SILENT - Quiet the terminal bell. - -r -R .... --raw-control-chars --RAW-CONTROL-CHARS - Output "raw" control characters. - -s ........ --squeeze-blank-lines - Squeeze multiple blank lines. - -S ........ --chop-long-lines - Chop (truncate) long lines rather than wrapping. - -t [_t_a_g] .. --tag=[_t_a_g] - Find a tag. - -T [_t_a_g_s_f_i_l_e] --tag-file=[_t_a_g_s_f_i_l_e] - Use an alternate tags file. - -u -U .... --underline-special --UNDERLINE-SPECIAL - Change handling of backspaces, tabs and carriage returns. - -V ........ --version - Display the version number of "less". - -w ........ --hilite-unread - Highlight first new line after forward-screen. - -W ........ --HILITE-UNREAD - Highlight first new line after any forward movement. - -x [_N[,...]] --tabs=[_N[,...]] - Set tab stops. - -X ........ --no-init - Don't use termcap init/deinit strings. - -y [_N] .... --max-forw-scroll=[_N] - Forward scroll limit. - -z [_N] .... --window=[_N] - Set size of window. - -" [_c[_c]] . --quotes=[_c[_c]] - Set shell quote characters. - -~ ........ --tilde - Don't display tildes after end of file. - -# [_N] .... --shift=[_N] - Set horizontal scroll amount (0 = one half screen width). - --exit-follow-on-close - Exit F command on a pipe when writer closes pipe. - --file-size - Automatically determine the size of the input file. - --follow-name - The F command changes files if the input file is renamed. - --header=[_N[,_M]] - Use N lines and M columns to display file headers. - --incsearch - Search file as each pattern character is typed in. - --intr=_C - Use _C instead of ^X to interrupt a read. - --line-num-width=_N - Set the width of the -N line number field to _N characters. - --modelines=_N - Read _N lines from the input file and look for vim modelines. - --mouse - Enable mouse input. - --no-keypad - Don't send termcap keypad init/deinit strings. - --no-histdups - Remove duplicates from command history. - --no-number-headers - Don't give line numbers to header lines. - --no-search-headers - Don't search in header lines or columns. - --no-vbell - Disable the terminal's visual bell. - --redraw-on-quit - Redraw final screen when quitting. - --rscroll=_C - Set the character used to mark truncated lines. - --save-marks - Retain marks across invocations of less. - --search-options=[EFKNRW-] - Set default options for every search. - --show-preproc-errors - Display a message if preprocessor exits with an error status. - --proc-backspace - Process backspaces for bold/underline. - --SPECIAL-BACKSPACE - Treat backspaces as control characters. - --proc-return - Delete carriage returns before newline. - --SPECIAL-RETURN - Treat carriage returns as control characters. - --proc-tab - Expand tabs to spaces. - --SPECIAL-TAB - Treat tabs as control characters. - --status-col-width=_N - Set the width of the -J status column to _N characters. - --status-line - Highlight or color the entire line containing a mark. - --use-backslash - Subsequent options use backslash as escape char. - --use-color - Enables colored text. - --wheel-lines=_N - Each click of the mouse wheel moves _N lines. - --wordwrap - Wrap lines at spaces. - - - --------------------------------------------------------------------------- - - LLIINNEE EEDDIITTIINNGG - - These keys can be used to edit text being entered - on the "command line" at the bottom of the screen. - - RightArrow ..................... ESC-l ... Move cursor right one character. - LeftArrow ...................... ESC-h ... Move cursor left one character. - ctrl-RightArrow ESC-RightArrow ESC-w ... Move cursor right one word. - ctrl-LeftArrow ESC-LeftArrow ESC-b ... Move cursor left one word. - HOME ........................... ESC-0 ... Move cursor to start of line. - END ............................ ESC-$ ... Move cursor to end of line. - BACKSPACE ................................ Delete char to left of cursor. - DELETE ......................... ESC-x ... Delete char under cursor. - ctrl-BACKSPACE ESC-BACKSPACE ........... Delete word to left of cursor. - ctrl-DELETE .... ESC-DELETE .... ESC-X ... Delete word under cursor. - ctrl-U ......... ESC (MS-DOS only) ....... Delete entire line. - UpArrow ........................ ESC-k ... Retrieve previous command line. - DownArrow ...................... ESC-j ... Retrieve next command line. - TAB ...................................... Complete filename & cycle. - SHIFT-TAB ...................... ESC-TAB Complete filename & reverse cycle. - ctrl-L ................................... Complete filename, list all. From 205122f81a138b8670bbb50b0ae21eb83c64adb5 Mon Sep 17 00:00:00 2001 From: Safae Ajib Date: Wed, 26 Mar 2025 11:39:20 +0100 Subject: [PATCH 4/9] Issue #40: Rebrand Codebase from Sentry Software to MetricsHub * Updated build.yml --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6f18438..b1c4f88 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,5 @@ jobs: uses: metricshub/workflows/.github/workflows/maven-build.yml@v1 with: jdkVersion: "17" - nodeVersion: "20.x" debug: ${{ github.event_name == 'workflow_dispatch' && inputs.debug }} ssh: ${{ github.event_name == 'workflow_dispatch' && inputs.ssh }} \ No newline at end of file From ba2ea1f95dbb29458dde376c257dad2021837979 Mon Sep 17 00:00:00 2001 From: Safae Ajib Date: Wed, 26 Mar 2025 12:46:11 +0100 Subject: [PATCH 5/9] Issue #40: Rebrand Codebase from Sentry Software to MetricsHub * Updated README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6db4939..d3505b5 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ # SSH Java Client -![GitHub release (with filter)](https://img.shields.io/github/v/release/sentrysoftware/ssh) -![Build](https://img.shields.io/github/actions/workflow/status/sentrysoftware/ssh/deploy.yml) -![GitHub top language](https://img.shields.io/github/languages/top/sentrysoftware/ssh) -![License](https://img.shields.io/github/license/sentrysoftware/ssh) +![GitHub release (with filter)](https://img.shields.io/github/v/release/metricshub/ssh) +![Build](https://img.shields.io/github/actions/workflow/status/metricshub/ssh/deploy.yml) +![GitHub top language](https://img.shields.io/github/languages/top/metricshub/ssh) +![License](https://img.shields.io/github/license/metricshub/ssh) The SSH Java client is a library that allows to execute commands using SSH protocol in distant hosts. -See **[Project Documentation](https://sentrysoftware.org/ssh)** and the [Javadoc](https://sentrysoftware.org/ssh/apidocs) for more information on how to use this library in your code. +See **[Project Documentation](https://metricshub.org/ssh)** and the [Javadoc](https://metricshub.org/ssh/apidocs) for more information on how to use this library in your code. ## Build instructions From cc1681a9a804cc7031aa79ec98a1b80892dd422a Mon Sep 17 00:00:00 2001 From: Safae Ajib Date: Wed, 26 Mar 2025 12:49:01 +0100 Subject: [PATCH 6/9] Issue #40: Rebrand Codebase from Sentry Software to MetricsHub * Updated README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d3505b5..8b71869 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ # SSH Java Client -![GitHub release (with filter)](https://img.shields.io/github/v/release/metricshub/ssh) -![Build](https://img.shields.io/github/actions/workflow/status/metricshub/ssh/deploy.yml) -![GitHub top language](https://img.shields.io/github/languages/top/metricshub/ssh) -![License](https://img.shields.io/github/license/metricshub/ssh) +![GitHub release (with filter)](https://img.shields.io/github/v/release/metricshub/ssh-java) +![Build](https://img.shields.io/github/actions/workflow/status/metricshub/ssh-java/deploy.yml) +![GitHub top language](https://img.shields.io/github/languages/top/metricshub/ssh-java) +![License](https://img.shields.io/github/license/metricshub/ssh-java) The SSH Java client is a library that allows to execute commands using SSH protocol in distant hosts. -See **[Project Documentation](https://metricshub.org/ssh)** and the [Javadoc](https://metricshub.org/ssh/apidocs) for more information on how to use this library in your code. +See **[Project Documentation](https://metricshub.org/ssh-java)** and the [Javadoc](https://metricshub.org/ssh-java/apidocs) for more information on how to use this library in your code. ## Build instructions From 71c6db2c957922233e4c8cf291d0f31c10c7e8b1 Mon Sep 17 00:00:00 2001 From: Safae Ajib Date: Wed, 26 Mar 2025 14:35:45 +0100 Subject: [PATCH 7/9] Issue #40: Rebrand Codebase from Sentry Software to MetricsHub * Updated pom.xml --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 06f8bd9..82b689b 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ https://metricsHub.com - https://metricsHub.org/ssh + https://metricsHub.org/ssh-java 2023 @@ -31,12 +31,12 @@ GitHub - https://github.com/metricsHub/ssh/issues/ + https://github.com/metricsHub/ssh-java/issues/ - scm:git:https://github.com/metricsHub/ssh.git - https://github.com/metricsHub/ssh + scm:git:https://github.com/metricsHub/ssh-java.git + https://github.com/metricsHub/ssh-java HEAD From 6cdf911197822ed8b9056ac40a509df889743485 Mon Sep 17 00:00:00 2001 From: Nassim Boutekedjiret Date: Thu, 27 Mar 2025 11:51:24 +0100 Subject: [PATCH 8/9] Issue #40: Improve Checkstyle configuration and SshClient file type determination - Update XML declaration and DOCTYPE in checkstyle.xml - Add encoding to XML declaration - Format Checkstyle module elements consistently - Remove redundant Checkstyle modules - Add braces to if-else statements in SshClient - Improve readability and maintainability of SshClient code --- checkstyle.origin.xml | 222 ++++++++++++++++++ checkstyle.xml | 73 ++---- .../java/org/metricshub/ssh/SshClient.java | 9 +- 3 files changed, 250 insertions(+), 54 deletions(-) create mode 100644 checkstyle.origin.xml diff --git a/checkstyle.origin.xml b/checkstyle.origin.xml new file mode 100644 index 0000000..2098fe6 --- /dev/null +++ b/checkstyle.origin.xml @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/checkstyle.xml b/checkstyle.xml index 2098fe6..6f36b51 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -1,8 +1,5 @@ - - - + + - - + + - + - + - - - - + + - + - - - - - - - @@ -92,15 +80,15 @@ - - - - - - - - - + + + + + + + + + @@ -123,10 +111,10 @@ - - - - + + + + @@ -143,14 +131,8 @@ - - - - - - @@ -159,17 +141,13 @@ - - - - + - @@ -194,16 +172,11 @@ - - - - - diff --git a/src/main/java/org/metricshub/ssh/SshClient.java b/src/main/java/org/metricshub/ssh/SshClient.java index 6b5dc4d..ed12d21 100644 --- a/src/main/java/org/metricshub/ssh/SshClient.java +++ b/src/main/java/org/metricshub/ssh/SshClient.java @@ -305,14 +305,15 @@ public String readFileAttributes(String filePath) throws IOException { // Determine the file type String fileType; - if (fileAttributes.isRegularFile()) + if (fileAttributes.isRegularFile()) { fileType = "FILE"; - else if (fileAttributes.isDirectory()) + } else if (fileAttributes.isDirectory()) { fileType = "DIR"; - else if (fileAttributes.isSymlink()) + } else if (fileAttributes.isSymlink()) { fileType = "LINK"; - else + } else { fileType = "UNKNOWN"; + } // Build the result in the same format as the PSL function file() StringBuilder pslFileResult = new StringBuilder(); From 350052d171c902a65f5dcc32275e7373af7128e3 Mon Sep 17 00:00:00 2001 From: Nassim Boutekedjiret Date: Thu, 27 Mar 2025 11:55:31 +0100 Subject: [PATCH 9/9] Issue #40: Updated workflows version to v2 --- .github/workflows/build.yml | 2 +- .github/workflows/deploy.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b1c4f88..ff2932d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ on: jobs: build: - uses: metricshub/workflows/.github/workflows/maven-build.yml@v1 + uses: metricshub/workflows/.github/workflows/maven-build.yml@v2 with: jdkVersion: "17" debug: ${{ github.event_name == 'workflow_dispatch' && inputs.debug }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d72efca..cf17156 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,7 +10,7 @@ on: jobs: deploy: - uses: metricshub/workflows/.github/workflows/maven-central-deploy.yml@v1 + uses: metricshub/workflows/.github/workflows/maven-central-deploy.yml@v2 with: jdkVersion: "17" secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 117de28..ba8ec25 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ on: jobs: release: - uses: metricshub/workflows/.github/workflows/maven-central-release.yml@v1 + uses: metricshub/workflows/.github/workflows/maven-central-release.yml@v2 with: releaseVersion: ${{ inputs.releaseVersion }} developmentVersion: ${{ inputs.developmentVersion }}