Browse Source

Upload

master
Kirill Nikolaev 5 months ago
parent
commit
00b064820b
Signed by: sokket <sokket@oceancraft.ru> GPG Key ID: 082FDA12D688C5C1
3 changed files with 25 additions and 2 deletions
  1. +20
    -1
      .gitlab-ci.yml
  2. +3
    -1
      CMakeLists.txt
  3. +2
    -0
      main.c

+ 20
- 1
.gitlab-ci.yml View File

@@ -19,7 +19,26 @@ Upload:
image: appropriate/curl
script:
- curl
-u $UPLOAD_TOKEN
-F "file=@sysmetrics.h"
-F "file=@libsysmetrics.a"
-F "file=@libsysmetrics.so"
https://repo.oceancraft.ru/push?token=$TOKEN
https://repo.oceancraft.ru/lmetrics/latest

Upload Tag:
stage: push
image: appropriate/curl
script:
- curl
-u $UPLOAD_TOKEN
-F projectName=lmetrics
-F name=$CI_COMMIT_TAG
https://repo.oceancraft.ru/-/tags/add
- curl
-u $UPLOAD_TOKEN
-F "file=@sysmetrics.h"
-F "file=@libsysmetrics.a"
-F "file=@libsysmetrics.so"
https://repo.oceancraft.ru/lmetrics/latest
only:
- tags

+ 3
- 1
CMakeLists.txt View File

@@ -20,4 +20,6 @@ install(TARGETS sysmetrics

install(TARGETS sysmetrics-static
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})

add_executable(sysmetrics-text main.c sysmetrics.c sysmetrics.h)

+ 2
- 0
main.c View File

@@ -3,5 +3,7 @@

int main() {
metrics *m = get_all_metrics();
for (temp_input *input = m->temp_inputs; input; input = input->next)
printf("%s %d %d\n", input->device_name, input->max_value, input->current_value);
free_metrics(m);
}

Loading…
Cancel
Save