Fossil SCM

Improved display of version information on the help command. Display fossil version number and date on the bottom of every webpage.

drh 2007-09-22 17:38 trunk
Commit c2d1e3c70ab5f209fc6df4f10bc6920f239c7f5b
+1 -1
--- src/main.c
+++ src/main.c
@@ -385,11 +385,11 @@
385385
int rc, idx;
386386
const char *z;
387387
if( g.argc!=3 ){
388388
printf("Usage: %s help COMMAND.\nAvailable COMMANDs:\n", g.argv[0]);
389389
cmd_cmd_list();
390
- printf("You are running fossil baseline " MANIFEST_UUID "\n");
390
+ printf("This is fossil version " MANIFEST_VERSION " " MANIFEST_DATE "\n");
391391
return;
392392
}
393393
rc = name_search(g.argv[2], aCommand, count(aCommand), &idx);
394394
if( rc==1 ){
395395
fossil_fatal("unknown command: %s", g.argv[2]);
396396
--- src/main.c
+++ src/main.c
@@ -385,11 +385,11 @@
385 int rc, idx;
386 const char *z;
387 if( g.argc!=3 ){
388 printf("Usage: %s help COMMAND.\nAvailable COMMANDs:\n", g.argv[0]);
389 cmd_cmd_list();
390 printf("You are running fossil baseline " MANIFEST_UUID "\n");
391 return;
392 }
393 rc = name_search(g.argv[2], aCommand, count(aCommand), &idx);
394 if( rc==1 ){
395 fossil_fatal("unknown command: %s", g.argv[2]);
396
--- src/main.c
+++ src/main.c
@@ -385,11 +385,11 @@
385 int rc, idx;
386 const char *z;
387 if( g.argc!=3 ){
388 printf("Usage: %s help COMMAND.\nAvailable COMMANDs:\n", g.argv[0]);
389 cmd_cmd_list();
390 printf("This is fossil version " MANIFEST_VERSION " " MANIFEST_DATE "\n");
391 return;
392 }
393 rc = name_search(g.argv[2], aCommand, count(aCommand), &idx);
394 if( rc==1 ){
395 fossil_fatal("unknown command: %s", g.argv[2]);
396
+3 -1
--- src/main.mk
+++ src/main.mk
@@ -187,12 +187,14 @@
187187
# build is done from, i.e. the checkout belongs to. Do not sync/push
188188
# the repository after running the tests.
189189
test: $(APPNAME)
190190
$(TCLSH) test/tester.tcl $(APPNAME)
191191
192
-VERSION.h: $(SRCDIR)/../manifest.uuid
192
+VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest
193193
awk '{ printf "#define MANIFEST_UUID \"%s\"\n", $$1}' $(SRCDIR)/../manifest.uuid >VERSION.h
194
+ awk '{ printf "#define MANIFEST_VERSION \"[%.10s]\"\n", $$1}' $(SRCDIR)/../manifest.uuid >>VERSION.h
195
+ awk '$$1=="D"{printf "#define MANIFEST_DATE \"%s %s\"\n", substr($$2,1,10),substr($$2,12)}' $(SRCDIR)/../manifest >>VERSION.h
194196
195197
$(APPNAME): headers $(OBJ) sqlite3.o
196198
$(TCC) -o $(APPNAME) $(OBJ) sqlite3.o $(LIB)
197199
198200
clean:
199201
--- src/main.mk
+++ src/main.mk
@@ -187,12 +187,14 @@
187 # build is done from, i.e. the checkout belongs to. Do not sync/push
188 # the repository after running the tests.
189 test: $(APPNAME)
190 $(TCLSH) test/tester.tcl $(APPNAME)
191
192 VERSION.h: $(SRCDIR)/../manifest.uuid
193 awk '{ printf "#define MANIFEST_UUID \"%s\"\n", $$1}' $(SRCDIR)/../manifest.uuid >VERSION.h
 
 
194
195 $(APPNAME): headers $(OBJ) sqlite3.o
196 $(TCC) -o $(APPNAME) $(OBJ) sqlite3.o $(LIB)
197
198 clean:
199
--- src/main.mk
+++ src/main.mk
@@ -187,12 +187,14 @@
187 # build is done from, i.e. the checkout belongs to. Do not sync/push
188 # the repository after running the tests.
189 test: $(APPNAME)
190 $(TCLSH) test/tester.tcl $(APPNAME)
191
192 VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest
193 awk '{ printf "#define MANIFEST_UUID \"%s\"\n", $$1}' $(SRCDIR)/../manifest.uuid >VERSION.h
194 awk '{ printf "#define MANIFEST_VERSION \"[%.10s]\"\n", $$1}' $(SRCDIR)/../manifest.uuid >>VERSION.h
195 awk '$$1=="D"{printf "#define MANIFEST_DATE \"%s %s\"\n", substr($$2,1,10),substr($$2,12)}' $(SRCDIR)/../manifest >>VERSION.h
196
197 $(APPNAME): headers $(OBJ) sqlite3.o
198 $(TCC) -o $(APPNAME) $(OBJ) sqlite3.o $(LIB)
199
200 clean:
201
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -112,13 +112,18 @@
112112
# build is done from, i.e. the checkout belongs to. Do not sync/push
113113
# the repository after running the tests.
114114
test: $(APPNAME)
115115
$(TCLSH) test/tester.tcl $(APPNAME)
116116
117
-VERSION.h: $(SRCDIR)/../manifest.uuid
117
+VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest
118118
awk '{ printf "#define MANIFEST_UUID \"%s\"\n", $$1}' \
119119
$(SRCDIR)/../manifest.uuid >VERSION.h
120
+ awk '{ printf "#define MANIFEST_VERSION \"[%.10s]\"\n", $$1}' \
121
+ $(SRCDIR)/../manifest.uuid >>VERSION.h
122
+ awk '$$1=="D"{printf "#define MANIFEST_DATE \"%s %s\"\n",\
123
+ substr($$2,1,10),substr($$2,12)}' \
124
+ $(SRCDIR)/../manifest >>VERSION.h
120125
121126
$(APPNAME): headers $(OBJ) sqlite3.o
122127
$(TCC) -o $(APPNAME) $(OBJ) sqlite3.o $(LIB)
123128
124129
clean:
125130
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -112,13 +112,18 @@
112 # build is done from, i.e. the checkout belongs to. Do not sync/push
113 # the repository after running the tests.
114 test: $(APPNAME)
115 $(TCLSH) test/tester.tcl $(APPNAME)
116
117 VERSION.h: $(SRCDIR)/../manifest.uuid
118 awk '{ printf "#define MANIFEST_UUID \"%s\"\n", $$1}' \
119 $(SRCDIR)/../manifest.uuid >VERSION.h
 
 
 
 
 
120
121 $(APPNAME): headers $(OBJ) sqlite3.o
122 $(TCC) -o $(APPNAME) $(OBJ) sqlite3.o $(LIB)
123
124 clean:
125
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -112,13 +112,18 @@
112 # build is done from, i.e. the checkout belongs to. Do not sync/push
113 # the repository after running the tests.
114 test: $(APPNAME)
115 $(TCLSH) test/tester.tcl $(APPNAME)
116
117 VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest
118 awk '{ printf "#define MANIFEST_UUID \"%s\"\n", $$1}' \
119 $(SRCDIR)/../manifest.uuid >VERSION.h
120 awk '{ printf "#define MANIFEST_VERSION \"[%.10s]\"\n", $$1}' \
121 $(SRCDIR)/../manifest.uuid >>VERSION.h
122 awk '$$1=="D"{printf "#define MANIFEST_DATE \"%s %s\"\n",\
123 substr($$2,1,10),substr($$2,12)}' \
124 $(SRCDIR)/../manifest >>VERSION.h
125
126 $(APPNAME): headers $(OBJ) sqlite3.o
127 $(TCC) -o $(APPNAME) $(OBJ) sqlite3.o $(LIB)
128
129 clean:
130
--- src/style.c
+++ src/style.c
@@ -125,10 +125,14 @@
125125
126126
/*
127127
** Draw the footer at the bottom of the page.
128128
*/
129129
void style_footer(void){
130
+ @ <hr>
131
+ @ <p align="left"><font size="1">
132
+ @ Fossil version %s(MANIFEST_VERSION) %s(MANIFEST_DATE)
133
+ @ </font></p>
130134
}
131135
132136
/*
133137
** WEBPAGE: index
134138
** WEBPAGE: home
135139
--- src/style.c
+++ src/style.c
@@ -125,10 +125,14 @@
125
126 /*
127 ** Draw the footer at the bottom of the page.
128 */
129 void style_footer(void){
 
 
 
 
130 }
131
132 /*
133 ** WEBPAGE: index
134 ** WEBPAGE: home
135
--- src/style.c
+++ src/style.c
@@ -125,10 +125,14 @@
125
126 /*
127 ** Draw the footer at the bottom of the page.
128 */
129 void style_footer(void){
130 @ <hr>
131 @ <p align="left"><font size="1">
132 @ Fossil version %s(MANIFEST_VERSION) %s(MANIFEST_DATE)
133 @ </font></p>
134 }
135
136 /*
137 ** WEBPAGE: index
138 ** WEBPAGE: home
139

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button