Skip to content

Commit

Permalink
Bump version 1.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <[email protected]>
  • Loading branch information
Jianhui Zhao committed Mar 9, 2018
1 parent 5ce9941 commit b80d2b0
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
[4]: https://github.com/zhaojh329/wifidog-ng/pulls
[5]: https://img.shields.io/badge/Issues-welcome-brightgreen.svg?style=plastic
[6]: https://github.com/zhaojh329/wifidog-ng/issues/new
[7]: https://img.shields.io/badge/release-1.0.0-blue.svg?style=plastic
[8]: https://github.com/zhaojh329/wifidog-ng/releases
[9]: https://travis-ci.org/zhaojh329/wifidog-ng.svg?branch=master
[10]: https://travis-ci.org/zhaojh329/wifidog-ng

[![license][1]][2]
[![PRs Welcome][3]][4]
[![Issue Welcome][5]][6]
[![Release Version][7]][8]
[![Build Status][9]][10]

[libuhttpd]: https://github.com/zhaojh329/libuhttpd
Expand Down
9 changes: 8 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
add_definitions(-O -Wall -Werror --std=gnu99 -D_GNU_SOURCE)

# The version number.
set(WIFIDOG_NG_VERSION_MAJOR 1)
set(WIFIDOG_NG_VERSION_MINOR 0)
set(WIFIDOG_NG_VERSION_PATCH 0)

# Check the third party Libraries
find_package(Libubox REQUIRED)
find_package(Libuhttpd REQUIRED)

include_directories(${LIBUHTTPD_INCLUDE_DIR} ${LIBUBOX_INCLUDE_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${LIBUHTTPD_INCLUDE_DIR} ${LIBUBOX_INCLUDE_DIR})
set(EXTRA_LIBS ${LIBUHTTPD_LIBRARY} ${LIBUBOX_LIBRARY} uci uclient blobmsg_json ubus cares)

add_executable(wifidog-ng gateway.c auth.c utils.c config.c http.c ping.c counters.c ubus.c
termianl.c resolv.c check_internet.c)

target_link_libraries(wifidog-ng ${EXTRA_LIBS})

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)

install(
TARGETS wifidog-ng
RUNTIME DESTINATION bin
Expand Down
3 changes: 3 additions & 0 deletions src/gateway.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <libubox/ulog.h>
#include <uhttpd/uhttpd.h>

#include "version.h"
#include "ubus.h"
#include "auth.h"
#include "utils.h"
Expand All @@ -30,6 +31,8 @@

int main(int argc, char **argv)
{
ULOG_INFO("wifidog-ng version %s\n", WIFIDOG_NG_VERSION_STRING);

if (parse_config())
return -1;

Expand Down
28 changes: 28 additions & 0 deletions src/version.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (C) 2017 Jianhui Zhao <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*/

#ifndef _WIFIDOG_NG_VERSION_H
#define _WIFIDOG_NG_VERSION_H

#define WIFIDOG_NG_VERSION_MAJOR @WIFIDOG_NG_VERSION_MAJOR@
#define WIFIDOG_NG_VERSION_MINOR @WIFIDOG_NG_VERSION_MINOR@
#define WIFIDOG_NG_VERSION_PATCH @WIFIDOG_NG_VERSION_PATCH@
#define WIFIDOG_NG_VERSION_STRING "@WIFIDOG_NG_VERSION_MAJOR@.@WIFIDOG_NG_VERSION_MINOR@.@WIFIDOG_NG_VERSION_PATCH@"

#endif

0 comments on commit b80d2b0

Please sign in to comment.