electron/atom/common/atom_version.h
Felix Rieseberg ee2a28b35b 🔧 Clean it up
2017-11-14 13:45:50 -08:00

36 lines
1.2 KiB
C

// Copyright (c) 2013 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_COMMON_ATOM_VERSION_H_
#define ATOM_COMMON_ATOM_VERSION_H_
#define ATOM_MAJOR_VERSION 1
#define ATOM_MINOR_VERSION 8
#define ATOM_PATCH_VERSION 2
#define ATOM_PRE_RELEASE_VERSION -beta.2
#ifndef ATOM_PRE_RELEASE_VERSION
# define ATOM_PRE_RELEASE_VERSION ""
#endif
#ifndef ATOM_STRINGIFY
#define ATOM_STRINGIFY(n) ATOM_STRINGIFY_HELPER(n)
#define ATOM_STRINGIFY_HELPER(n) #n
#endif
# define ATOM_VERSION_STRING ATOM_STRINGIFY(ATOM_MAJOR_VERSION) "." \
ATOM_STRINGIFY(ATOM_MINOR_VERSION) "." \
ATOM_STRINGIFY(ATOM_PATCH_VERSION) \
ATOM_STRINGIFY(ATOM_PRE_RELEASE_VERSION)
#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_COMMON_ATOM_VERSION_H_