Skip to content

Commit

Permalink
[FIX] fix version number (#61)
Browse files Browse the repository at this point in the history
* fix version

* update dockerfile

* add bump version docker recipe

* validate citation cff file and add a validation workflow

* make dep/laynii_lib.cpp the ground truth for version number and update citation.cff from it

* fix wrongly changed cff-version: that is why it is a good thing to validate things in CI
  • Loading branch information
Remi-Gau authored Jan 30, 2023
1 parent 9b2cfd7 commit d3c5531
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 7 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: validation

on:
push:
branches: ['*']
pull_request:
branches: ['*']

concurrency:
# only run one instance of this workflow at a time
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

validate_cff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check whether the citation metadata from CITATION.cff is valid
uses: citation-file-format/[email protected]
with:
args: "--validate"
6 changes: 3 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cff-version: 1.1.0
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Huber
Expand Down Expand Up @@ -60,6 +60,6 @@ authors:
orcid: https://orcid.org/0000-0001-7761-3727

title: "LayNii: A software suite for layer-fMRI"
version: 2.1.1dev
doi: https://doi.org/10.1016/j.neuroimage.2021.118091
version: v2.3.0
doi: 10.1016/j.neuroimage.2021.118091
date-released: 2021-07-16
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated by: Neurodocker version 0.7.0+0.gdc97516.dirty
# Latest release: Neurodocker version 0.8.0
# Timestamp: 2022/03/29 17:10:18 UTC
# Latest release: Neurodocker version 0.9.1
# Timestamp: 2022/12/28 20:15:20 UTC
#
# Thank you for using Neurodocker. If you discover any issues
# or ways to improve this software, please submit an issue or
Expand Down Expand Up @@ -43,7 +43,7 @@ RUN export ND_ENTRYPOINT="/neurodocker/startup.sh" \

ENTRYPOINT ["/neurodocker/startup.sh"]

LABEL version="2.1.1dev"
LABEL version="v2.3.0"

RUN apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
Expand Down Expand Up @@ -80,7 +80,7 @@ RUN echo '{ \
\n [ \
\n "label", \
\n { \
\n "version": "2.1.1dev" \
\n "version": "v2.3.0" \
\n } \
\n ], \
\n [ \
Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,16 @@ clean:
tests:
cd test_data && bash ./tests.sh

# =============================================================================
# Maintenance

bump_version:
VERSION=`cat dep/laynii_lib.cpp | grep LayNii | cut -c 21- | rev | cut -c 20- | rev` && \
echo "\nbumping to version: $$VERSION \n" && \
sed -i "s/^version:.*/version: $$VERSION/g" CITATION.cff
make Dockerfile


# =============================================================================
# Docker related content

Expand Down

0 comments on commit d3c5531

Please sign in to comment.