Browse Source

Update mkit

Alois Mahdal 9 years ago
parent
commit
0ec0029109
1 changed files with 21 additions and 7 deletions
  1. 21
    7
      mkit/include/release.sh

+ 21
- 7
mkit/include/release.sh View File

23
     # Span release routines: make a signed tag, check branch
23
     # Span release routines: make a signed tag, check branch
24
     # and update release branch
24
     # and update release branch
25
     #
25
     #
26
+    # FIXME: Using PRERELEASE as build.sh:get_version() does may not be
27
+    #        compatible with this release strategy
28
+    #
26
     local level=$1
29
     local level=$1
27
     git rev-parse HEAD >&/dev/null || die "cannot release outside git repo"
30
     git rev-parse HEAD >&/dev/null || die "cannot release outside git repo"
28
     local lastfile=$(git diff-tree --no-commit-id --name-only -r HEAD)
31
     local lastfile=$(git diff-tree --no-commit-id --name-only -r HEAD)
34
     local newver=$(__make_ver $level ${lasttag#v})
37
     local newver=$(__make_ver $level ${lasttag#v})
35
     local newtag=v$newver
38
     local newtag=v$newver
36
     local higher=$(echo -e "$oldtag\n$newtag" | sort -V | tail -n1)
39
     local higher=$(echo -e "$oldtag\n$newtag" | sort -V | tail -n1)
37
-    test "$newtag" = "$higher"     || die "generated tag looks older: $oldtag<$newtag"
38
 
40
 
39
-    grep -qw "$newver" config.mk   || die "new version not in config.mk: $newver"
40
-    test -n "$lasttag"             || die "cannot find last tag"
41
-    grep '^....... WIP ' <<<"$changelog" && die "WIP commit since $lasttag"
42
-    grep -qw "$curbranch" <<<"$RELSRC"   || die "you are not on RELSRC branch: $RELSRC"
43
-    test -z "$dirt"                || die "tree is dirty: $dirt"
41
+    test "$newtag" = "$higher" \
42
+     || die "generated tag looks older: $oldtag<$newtag"
43
+
44
+    grep -qw "$newver" config.mk \
45
+     || die "new version not in config.mk: $newver"
46
+
47
+    test -n "$lasttag" \
48
+     || die "cannot find last tag"
49
+
50
+    grep '^....... WIP ' <<<"$changelog" \
51
+     && die "WIP commit since $lasttag"
52
+
53
+    grep -qw "$curbranch" <<<"$RELSRC" \
54
+     || die "you are not on RELSRC branch: $RELSRC"
55
+
56
+    test -z "$dirt" \
57
+     || die "tree is dirty: $dirt"
44
 
58
 
45
     # FIXME: Have user prepare proper message with changelog
59
     # FIXME: Have user prepare proper message with changelog
46
 
60
 
47
     set -e
61
     set -e
48
-    git tag -m "$MKIT_PROJNAME $newtag-$STAGE - $CODENAME" $newtag
62
+    git tag -m "$MKIT_PROJNAME $newtag - $CODENAME" $newtag
49
     git branch -f $RELDST $newtag
63
     git branch -f $RELDST $newtag
50
 }
64
 }
51
 
65