Fossil SCM
Improved display of version information on the help command. Display fossil version number and date on the bottom of every webpage.
Commit
c2d1e3c70ab5f209fc6df4f10bc6920f239c7f5b
Parent
3b5514ed825c5cd…
4 files changed
+1
-1
+3
-1
+6
-1
+4
+1
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -385,11 +385,11 @@ | ||
| 385 | 385 | int rc, idx; |
| 386 | 386 | const char *z; |
| 387 | 387 | if( g.argc!=3 ){ |
| 388 | 388 | printf("Usage: %s help COMMAND.\nAvailable COMMANDs:\n", g.argv[0]); |
| 389 | 389 | cmd_cmd_list(); |
| 390 | - printf("You are running fossil baseline " MANIFEST_UUID "\n"); | |
| 390 | + printf("This is fossil version " MANIFEST_VERSION " " MANIFEST_DATE "\n"); | |
| 391 | 391 | return; |
| 392 | 392 | } |
| 393 | 393 | rc = name_search(g.argv[2], aCommand, count(aCommand), &idx); |
| 394 | 394 | if( rc==1 ){ |
| 395 | 395 | fossil_fatal("unknown command: %s", g.argv[2]); |
| 396 | 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("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 @@ | ||
| 187 | 187 | # build is done from, i.e. the checkout belongs to. Do not sync/push |
| 188 | 188 | # the repository after running the tests. |
| 189 | 189 | test: $(APPNAME) |
| 190 | 190 | $(TCLSH) test/tester.tcl $(APPNAME) |
| 191 | 191 | |
| 192 | -VERSION.h: $(SRCDIR)/../manifest.uuid | |
| 192 | +VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest | |
| 193 | 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 | |
| 194 | 196 | |
| 195 | 197 | $(APPNAME): headers $(OBJ) sqlite3.o |
| 196 | 198 | $(TCC) -o $(APPNAME) $(OBJ) sqlite3.o $(LIB) |
| 197 | 199 | |
| 198 | 200 | clean: |
| 199 | 201 |
| --- 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 |
+6
-1
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -112,13 +112,18 @@ | ||
| 112 | 112 | # build is done from, i.e. the checkout belongs to. Do not sync/push |
| 113 | 113 | # the repository after running the tests. |
| 114 | 114 | test: $(APPNAME) |
| 115 | 115 | $(TCLSH) test/tester.tcl $(APPNAME) |
| 116 | 116 | |
| 117 | -VERSION.h: $(SRCDIR)/../manifest.uuid | |
| 117 | +VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest | |
| 118 | 118 | awk '{ printf "#define MANIFEST_UUID \"%s\"\n", $$1}' \ |
| 119 | 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 | |
| 120 | 125 | |
| 121 | 126 | $(APPNAME): headers $(OBJ) sqlite3.o |
| 122 | 127 | $(TCC) -o $(APPNAME) $(OBJ) sqlite3.o $(LIB) |
| 123 | 128 | |
| 124 | 129 | clean: |
| 125 | 130 |
| --- 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 |
+4
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -125,10 +125,14 @@ | ||
| 125 | 125 | |
| 126 | 126 | /* |
| 127 | 127 | ** Draw the footer at the bottom of the page. |
| 128 | 128 | */ |
| 129 | 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> | |
| 130 | 134 | } |
| 131 | 135 | |
| 132 | 136 | /* |
| 133 | 137 | ** WEBPAGE: index |
| 134 | 138 | ** WEBPAGE: home |
| 135 | 139 |
| --- 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 |