|
| 1 | +# frozen_string_literal: true |
| 2 | +# SPDX-License-Identifier: Proprietary |
| 3 | +# |
| 4 | +# ASRFacet-Rb: Attack Surface Reconnaissance Framework |
| 5 | +# Copyright (c) 2026 voltsparx |
| 6 | +# |
| 7 | +# Author: voltsparx |
| 8 | +# Repository: https://github.com/voltsparx/ASRFacet-Rb |
| 9 | +# Contact: voltsparx@gmail.com |
| 10 | +# License: See LICENSE file in the project root |
| 11 | +# |
| 12 | +# This file is part of ASRFacet-Rb and is subject to the terms |
| 13 | +# and conditions defined in the LICENSE file. |
| 14 | + |
| 15 | +require "json" |
| 16 | +require_relative "support/smoke_helper" |
| 17 | + |
| 18 | +include ASRFacet::TestSupport |
| 19 | + |
| 20 | +announce("Version alignment verification started.") |
| 21 | + |
| 22 | +expected = expected_version |
| 23 | + |
| 24 | +version_file = File.read(File.join(ROOT, "VERSION")).strip |
| 25 | +assert(version_file == expected, "VERSION file reported #{version_file.inspect}, expected #{expected.inspect}.") |
| 26 | + |
| 27 | +cli_version = run_command(*ruby_command("bin/asrfacet-rb", "--version")).strip |
| 28 | +assert(cli_version == expected, "CLI reported #{cli_version.inspect}, expected #{expected.inspect}.") |
| 29 | + |
| 30 | +package_json_path = File.join(ROOT, "lib", "asrfacet_rb", "output", "js", "package.json") |
| 31 | +package_json = JSON.parse(File.read(package_json_path)) |
| 32 | +package_version = package_json.fetch("version", "").to_s.strip |
| 33 | +assert(package_version == expected, "JS output package reported #{package_version.inspect}, expected #{expected.inspect}.") |
| 34 | + |
| 35 | +changelog = File.read(File.join(ROOT, "CHANGELOG.md")) |
| 36 | +assert(changelog.include?("## [#{expected}]"), "CHANGELOG.md does not contain a release section for #{expected}.") |
| 37 | + |
| 38 | +website_pages = %w[ |
| 39 | + docs/website/index.html |
| 40 | + docs/website/cli-reference.html |
| 41 | + docs/website/getting-started.html |
| 42 | + docs/website/modes.html |
| 43 | + docs/website/workflow.html |
| 44 | + docs/website/reporting.html |
| 45 | + docs/website/project.html |
| 46 | + docs/website/development.html |
| 47 | +] |
| 48 | + |
| 49 | +website_pages.each do |relative_path| |
| 50 | + content = File.read(File.join(ROOT, relative_path)) |
| 51 | + assert(content.include?("v#{expected}"), "#{relative_path} is missing the v#{expected} site marker.") |
| 52 | +end |
| 53 | + |
| 54 | +announce("Version alignment verification passed.") |
0 commit comments