Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#129 Version Numbers split #134

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,26 @@ chmod 777 $RELEASE_FOLDER/*.*

#Replace any references for the version number
sed -i.del "s/x\.x\.x/$VERSION_NUMBER/g" $RELEASE_FOLDER/logger_install.sql
sed -i.del "s/x\.x\.x/$VERSION_NUMBER/g" $RELEASE_FOLDER/logger.pks

# Orginial:
# sed -i.del "s/x\.x\.x/$VERSION_NUMBER/g" $RELEASE_FOLDER/logger.pks
# #129: Change the version number to the individual components
echo $VERSION_NUMBER | while IFS=. read major minor patch beta
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alex ignore this is a test.

do
#Replace major version
sed -i.del "s/-91/$major/g" $RELEASE_FOLDER/logger.pks
sed -i.del "s/-91/$major/g" $RELEASE_FOLDER/logger_install.sql
#Replace minor version
sed -i.del "s/-92/$minor/g" $RELEASE_FOLDER/logger.pks
sed -i.del "s/-92/$minor/g" $RELEASE_FOLDER/logger_install.sql
#Replace patch version
sed -i.del "s/-93/$patch/g" $RELEASE_FOLDER/logger.pks
sed -i.del "s/-93/$patch/g" $RELEASE_FOLDER/logger_install.sql
#Replace #beta# version
sed -i.del "s/#beta#/$beta/g" $RELEASE_FOLDER/logger.pks
sed -i.del "s/#beta#/$beta/g" $RELEASE_FOLDER/logger_install.sql
done

#need to remove the backup file required for sed call
rm -rf $RELEASE_FOLDER/*.del

Expand Down
18 changes: 16 additions & 2 deletions source/packages/logger.pks
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,22 @@ as


-- VARIABLES
g_logger_version constant varchar2(10) := 'x.x.x'; -- Don't change this. Build script will replace with right version number
g_context_name constant varchar2(35) := substr(sys_context('USERENV','CURRENT_SCHEMA'),1,23)||'_LOGCTX';
-- #129
-- Don't change the version number. Build script will
-- set the right version number
g_major_version constant pls_integer := -91;
g_minor_version constant pls_integer := -92;
g_patch_version constant pls_integer := -93;
g_beta_version constant varchar2(10) := '#beta#';
g_logger_version constant varchar2(20) :=
g_major_version||'.'||
g_minor_version||'.'||
g_patch_version||
case when g_beta_version is not null
then '_'||g_beta_version
end;
-- g_logger_version constant varchar2(10) := 'x.x.x'; -- Don't change this. Build script will replace with right version number
g_context_name constant varchar2(35) := substr(sys_context('USERENV','CURRENT_SCHEMA'),1,23)||'_LOGCTX';

g_off constant number := 0;
g_permanent constant number := 1;
Expand Down