~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to m4/pandora_vc_build.m4

  • Committer: Monty Taylor
  • Date: 2011-03-06 19:43:34 UTC
  • mto: (2221.2.1 build)
  • mto: This revision was merged to the branch mainline in revision 2222.
  • Revision ID: mordred@inaugust.com-20110306194334-k865zdw3uf1c8c5w
Added git support and support for setting current version based on most
recent tag plus revno.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        PANDORA_VC_REVID=`bzr log -r-1 --show-ids | grep revision-id | cut -f2 -d' ' | head -1`
62
62
        PANDORA_VC_BRANCH=`bzr nick`
63
63
        PANDORA_VC_TAG=`bzr tags -r-1 | cut -f1 -d' ' | head -1`
 
64
        PANDORA_VC_LATEST_TAG=`bzr tags --sort=time | grep -v '\?'| cut -f1 -d' '  | tail -1`
64
65
        if test "x${vc_changelog}" = "xyes"; then
65
66
          bzr log --gnu > ChangeLog
66
67
        fi
67
68
      fi
 
69
    elif test "${pandora_building_from_git}" = "yes"; then
 
70
      echo "# Grabbing changelog and version information from git"
 
71
      PANDORA_GIT_REVID=`git --no-pager log --max-count=1 | cut -f2 -d' ' | head -1`
 
72
      if test "x$PANDORA_GIT_REVID" != "x${PANDORA_VC_REVNO}" ; then
 
73
         PANDORA_VC_REVID="${PANDORA_GIT_REVID}"
 
74
         PANDORA_VC_BRANCH=`git branch | grep -Ei "\* (.*)" | cut -f2 -d' '`
 
75
      fi
68
76
    fi
69
77
 
70
78
    if ! test -d config ; then
77
85
PANDORA_VC_REVID=${PANDORA_VC_REVID}
78
86
PANDORA_VC_BRANCH=${PANDORA_VC_BRANCH}
79
87
PANDORA_VC_TAG=${PANDORA_VC_TAG}
 
88
PANDORA_VC_LATEST_TAG=${PANDORA_VC_LATEST_TAG}
80
89
PANDORA_RELEASE_DATE=${PANDORA_RELEASE_DATE}
81
90
PANDORA_RELEASE_NODOTS_DATE=${PANDORA_RELEASE_NODOTS_DATE}
82
91
EOF
104
113
                            ${srcdir}/config/pandora_vc_revinfo)
105
114
    _PANDORA_READ_FROM_FILE([PANDORA_VC_TAG],
106
115
                            ${srcdir}/config/pandora_vc_revinfo)
 
116
    _PANDORA_READ_FROM_FILE([PANDORA_VC_LATEST_TAG],
 
117
                            ${srcdir}/config/pandora_vc_revinfo)
107
118
    _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_DATE],
108
119
                            ${srcdir}/config/pandora_vc_revinfo)
109
120
    _PANDORA_READ_FROM_FILE([PANDORA_RELEASE_NODOTS_DATE],
115
126
    PANDORA_RELEASE_COMMENT="trunk"
116
127
  ])
117
128
    
118
 
  AS_IF([test "x${PANDORA_VC_TAG}" = "x"],[
119
 
    PANDORA_RELEASE_VERSION="${PANDORA_RELEASE_DATE}.${PANDORA_VC_REVNO}"
120
 
  ],[
 
129
  AS_IF([test "x${PANDORA_VC_TAG}" != "x"],[
121
130
    PANDORA_RELEASE_VERSION="${PANDORA_VC_TAG}"
 
131
  ],[
 
132
    AS_IF([test "x${PANDORA_VC_LATEST_TAG}" != "x"],[
 
133
      PANDORA_RELEASE_VERSION="${PANDORA_VC_LATEST_TAG}.${PANDORA_VC_REVNO}"
 
134
    ],[
 
135
      PANDORA_RELEASE_VERSION="${PANDORA_RELEASE_DATE}.${PANDORA_VC_REVNO}"
 
136
    ])
122
137
  ])
123
 
  PANDORA_RELEASE_ID="${PANDORA_RELEASE_NODOTS_DATE}${PANDORA_VC_REVNO}"
 
138
  changequote(<<, >>)dnl
 
139
  PANDORA_RELEASE_ID=`echo ${PANDORA_RELEASE_VERSION} | sed 's/[^0-9]//g'`
 
140
  changequote([, ])dnl
 
141
 
124
142
 
125
143
  VERSION="${PANDORA_RELEASE_VERSION}"
126
144
  AC_DEFINE_UNQUOTED([PANDORA_RELEASE_VERSION],["${PANDORA_RELEASE_VERSION}"],