Browse Source

Allow overriding version

Not everyone likes v0.0.0.  While it's trivial to change, the other
reason for this is scenario when user just updates (re-builds) the
meta-data.
Alois Mahdal 7 years ago
parent
commit
0b17979006
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      src/newstub

+ 4
- 1
src/newstub View File

64
 
64
 
65
         */mkit.ini|mkit.ini)
65
         */mkit.ini|mkit.ini)
66
             echo "[project]"
66
             echo "[project]"
67
-            echo "    version     = 0.0.0"
67
+            echo "    version     = $Version"
68
             test -n "$Codename"     && echo "    codename    = $Codename"
68
             test -n "$Codename"     && echo "    codename    = $Codename"
69
             test -n "$NiceName"     && echo "    name        = $NiceName"
69
             test -n "$NiceName"     && echo "    name        = $NiceName"
70
             test -n "$Tagline"      && echo "    tagline     = $Tagline"
70
             test -n "$Tagline"      && echo "    tagline     = $Tagline"
452
         echo "    -l LICENSE    your options's license (see -L)"
452
         echo "    -l LICENSE    your options's license (see -L)"
453
         echo "    -m MAINT      project maintainer's name and e-mail"
453
         echo "    -m MAINT      project maintainer's name and e-mail"
454
         echo "    -v URL        URL to public code browser"
454
         echo "    -v URL        URL to public code browser"
455
+        echo "    -V VERSION    initial version (default: 0.0.0)"
455
         echo "    -a            enable autoclean ('make clean' after"
456
         echo "    -a            enable autoclean ('make clean' after"
456
         echo "                  each 'make install')"
457
         echo "                  each 'make install')"
457
         echo "    -g            make git commits before and adter"
458
         echo "    -g            make git commits before and adter"
535
     local Tagline           # project tagline
536
     local Tagline           # project tagline
536
     local Maintainer        # project maintainer (Name + e-mail)
537
     local Maintainer        # project maintainer (Name + e-mail)
537
     local VcsBrowser        # VCS browser (eg. GitHub URL)
538
     local VcsBrowser        # VCS browser (eg. GitHub URL)
539
+    local Version=0.0.0     # project version
538
     local AutoClean=false   # touch .mkit/autoclean?
540
     local AutoClean=false   # touch .mkit/autoclean?
539
     local MkCommits=false   # create pre/post git commits?
541
     local MkCommits=false   # create pre/post git commits?
540
     local Force=false       # go without asking?
542
     local Force=false       # go without asking?
551
         -l) License=$2;         shift 2 || usage ;;
553
         -l) License=$2;         shift 2 || usage ;;
552
         -m) Maintainer=$2;      shift 2 || usage ;;
554
         -m) Maintainer=$2;      shift 2 || usage ;;
553
         -v) VcsBrowser=$2;      shift 2 || usage ;;
555
         -v) VcsBrowser=$2;      shift 2 || usage ;;
556
+        -V) Version=$2;         shift 2 || usage ;;
554
         -M) MkMakefile=false;   shift ;;
557
         -M) MkMakefile=false;   shift ;;
555
         -R) MkReadme=false;     shift ;;
558
         -R) MkReadme=false;     shift ;;
556
         -a) AutoClean=true;     shift ;;
559
         -a) AutoClean=true;     shift ;;