Skip to content

Commit

Permalink
Remove: Faulty previous changes, regarding version string
Browse files Browse the repository at this point in the history
  • Loading branch information
y0urself committed Jun 10, 2022
1 parent e376d7e commit 6e3e66e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/gmp/gmpsettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import {RELEASE_VERSION, REMOVED_ZERO_RELEASE_VERSION} from '../version';
import {RELEASE_VERSION} from '../version';

import {isDefined} from './utils/identity';

export const DEFAULT_RELOAD_INTERVAL = 15 * 1000; // fifteen seconds
export const DEFAULT_RELOAD_INTERVAL_ACTIVE = 3 * 1000; // three seconds
export const DEFAULT_RELOAD_INTERVAL_INACTIVE = 60 * 1000; // one minute
export const DEFAULT_MANUAL_URL = `http://docs.greenbone.net/GSM-Manual/gos-${REMOVED_ZERO_RELEASE_VERSION}/`;
export const DEFAULT_MANUAL_URL = `http://docs.greenbone.net/GSM-Manual/gos-${RELEASE_VERSION}/`;
export const DEFAULT_PROTOCOLDOC_URL = `https://docs.greenbone.net/API/GMP/gmp-${RELEASE_VERSION}.html`;
export const DEFAULT_REPORT_RESULTS_THRESHOLD = 25000;
export const DEFAULT_LOG_LEVEL = 'warn';
Expand Down
16 changes: 5 additions & 11 deletions src/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,17 @@

const getMajorMinorVersion = () => {
// eslint-disable-next-line no-unused-vars
const [major, minor, ...rest] = VERSION.split('.');
minor = parseInt(minor)
if (minor < 10)
let [major, minor, ...rest] = VERSION.split('.');
minor = parseInt(minor);
if (minor < 10) {
// add a leading zero for the links
minor = `0${minor}`
minor = `0${minor}`;
}
return `${major}.${minor}`;
};

const getCleanedMajorMinorVersion = () => {
// eslint-disable-next-line no-unused-vars
const [major, minor, ...rest] = VERSION.split('.');
return `${major}.${parseInt(minor)}`;
};

export const VERSION = '22.04.0.dev1';

export const RELEASE_VERSION = getMajorMinorVersion();
export const REMOVED_ZERO_RELEASE_VERSION = getCleanedMajorMinorVersion();

export default VERSION;

0 comments on commit 6e3e66e

Please sign in to comment.