Add version file.
This commit is contained in:
parent
47be87fe5f
commit
6684cdd72a
1 changed files with 43 additions and 0 deletions
43
common/atom_version.h
Normal file
43
common/atom_version.h
Normal file
|
@ -0,0 +1,43 @@
|
|||
// Copyright (c) 2013 GitHub, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ATOM_VERSION_H
|
||||
#define ATOM_VERSION_H
|
||||
|
||||
#define ATOM_MAJOR_VERSION 0
|
||||
#define ATOM_MINOR_VERSION 3
|
||||
#define ATOM_PATCH_VERSION 1
|
||||
|
||||
#define ATOM_VERSION_IS_RELEASE 0
|
||||
|
||||
#ifndef ATOM_TAG
|
||||
# define ATOM_TAG ""
|
||||
#endif
|
||||
|
||||
#ifndef ATOM_STRINGIFY
|
||||
#define ATOM_STRINGIFY(n) ATOM_STRINGIFY_HELPER(n)
|
||||
#define ATOM_STRINGIFY_HELPER(n) #n
|
||||
#endif
|
||||
|
||||
#if ATOM_VERSION_IS_RELEASE
|
||||
# define ATOM_VERSION_STRING ATOM_STRINGIFY(ATOM_MAJOR_VERSION) "." \
|
||||
ATOM_STRINGIFY(ATOM_MINOR_VERSION) "." \
|
||||
ATOM_STRINGIFY(ATOM_PATCH_VERSION) \
|
||||
ATOM_TAG
|
||||
#else
|
||||
# define ATOM_VERSION_STRING ATOM_STRINGIFY(ATOM_MAJOR_VERSION) "." \
|
||||
ATOM_STRINGIFY(ATOM_MINOR_VERSION) "." \
|
||||
ATOM_STRINGIFY(ATOM_PATCH_VERSION) \
|
||||
ATOM_TAG "-pre"
|
||||
#endif
|
||||
|
||||
#define ATOM_VERSION "v" ATOM_VERSION_STRING
|
||||
|
||||
|
||||
#define ATOM_VERSION_AT_LEAST(major, minor, patch) \
|
||||
(( (major) < ATOM_MAJOR_VERSION) \
|
||||
|| ((major) == ATOM_MAJOR_VERSION && (minor) < ATOM_MINOR_VERSION) \
|
||||
|| ((major) == ATOM_MAJOR_VERSION && (minor) == ATOM_MINOR_VERSION && (patch) <= ATOM_PATCH_VERSION))
|
||||
|
||||
#endif /* ATOM_VERSION_H */
|
Loading…
Add table
Reference in a new issue