Skip to content

Commit

Permalink
Add comment regarding the need to keep "Version A"
Browse files Browse the repository at this point in the history
Related #1443
  • Loading branch information
krader1961 committed Nov 22, 2019
1 parent 0525de9 commit 42a580c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,23 @@ Alternately, a development version can be installed using:
sudo port install ksh-devel
```

## Versioning

We have switched from the legacy versioning scheme to
[semantic versioning](https://github.com/att/ast/issues/335). The first
release after the last stable, ksh93u+, release is version 2020.0.0 which has
numeric version number 20200000. This means you can still evaluate
`$KSH_VERSION` or `${.sh.version}` in numeric context to determine if the
current shell is older or newer than a specific release (e.g., 20120801 for
the ksh93u+ release).

If the shell is built without Git metadata a hardcoded value is used. That
value will be one of two things. If building from a stable release branch
it will be whatever value was assigned to that branch; e.g., 2020.0.1.
If building from the master, experimental, branch it will be the most
recent major release number and 99 for the minor and patch levels; e.g.,
2020.99.99. This should serve as a warning that you don't really know
what commit was used when building ksh.

## Contributing changes to the source code

Expand Down Expand Up @@ -128,13 +145,13 @@ the current development version of ksh93. It only contains source code
for ksh93 and the libraries required to build it.

The [2012-08-01-master branch](https://github.com/att/ast/commits/2012-08-01-master)
contains the last stable release of
full AST source code. It contains one cherry-picked
contains the last stable release, ksh93u+,
of full AST source code. It contains one cherry-picked
[change](https://github.com/att/ast/commit/e79c29295092fe2b2282d134e2b7cce32ec9dcac)
to allow building on Linux.

The [2016-01-10-beta branch](https://github.com/att/ast/commits/2016-01-10-beta) contains
the last beta release of full AST source code plus a number of patches
the last beta release, ksh93v-, of full AST source code plus a number of patches
that were later added on top of it. Changes for the legacy AST project are
normally merged to this branch.

Expand Down
2 changes: 1 addition & 1 deletion meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ option('build-api-tests-only', type : 'boolean', value : false)

# This number is used when git is not available
# meson -Dfallback-version-number='x.y.z'
option('fallback-version-number', type : 'string', value : '2020.0.0-beta1')
option('fallback-version-number', type : 'string', value : '2020.99.99')

# To build with support for ASAN (AddressSanitizer:
# meson -DASAN=true
Expand Down
5 changes: 5 additions & 0 deletions src/cmd/ksh93/sh/version.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
const char *ksh_version = "@VCS_TAG@";
const char *e_version =
"Version "
// Do not remove this string. See https://github.com/att/ast/issues/1443. There may be people or
// scripts depending on "Version A" being present to distinguish this code from ksh clones even
// though there is no guarantee legacy ksh builds include this string. So even if we ultimately
// remove the insecure command audit facility this string needs to be retained. See also
// https://github.com/att/ast/issues/240.
"A"
#if SHOPT_BASH
"B"
Expand Down

0 comments on commit 42a580c

Please sign in to comment.