diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 304b6e659a9529382466bc991b10d9b5356f0bd0..6f41afbbb8d065d8acca224142f06b1eb2412924 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,42 +3,72 @@ # 1. Ensure code quality # 2. Generate releases automatically +variables: + GIT_SUBMODULE_STRATEGY: normal + PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}" # Using the official Python Docker image as default default: image: python + +# Install miss_hit +.miss_hit: &miss_hit before_script: - pip install miss_hit # Pipeline stages stages: - static analysis + - package - release # Static code analysis jobs via MISS_HIT style_check: + <<: *miss_hit stage: static analysis script: - mh_style . --fix metric_check: + <<: *miss_hit stage: static analysis script: - mh_metric . --ci lint_check: + <<: *miss_hit stage: static analysis script: - mh_lint . -# TODO: Use git-archive-all and bake an archive that includes submodules -release_job: +# Create an archive of the code and its submodules +archive_all: + stage: package + rules: + - if: $CI_COMMIT_TAG + before_script: + - pip install git-archive-all + script: + - echo "Packaging source with submodules" + - git-archive-all --force-submodules "${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.zip" + - 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file "${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.zip" "${PACKAGE_REGISTRY_URL}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.zip"' + - git-archive-all --force-submodules "${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.gz" + - 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file "${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.gz" "${PACKAGE_REGISTRY_URL}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.gz"' + +make_release: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest + needs: ["archive_all"] rules: - - if: $CI_COMMIT_TAG # Run when we create a new tag + - if: $CI_COMMIT_TAG script: - echo "Running release_job for $TAG" release: tag_name: '$CI_COMMIT_TAG' - description: 'Automatic release for version $CI_COMMIT_TAG' + description: ./RELEASE.md + assets: + links: + - name: 'COMPLETE CODE: ${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.zip' + url: "${PACKAGE_REGISTRY_URL}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.zip" + - name: 'COMPLETE CODE: ${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.gz' + url: "${PACKAGE_REGISTRY_URL}/${CI_COMMIT_TAG}/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.gz" diff --git a/.gitmodules b/.gitmodules index 2b337fa3544c4a38b20a0f648a4c4b8118f8b203..d6a9b88132a98d0190d492b46e12f354b9970d44 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "validation/rotor-db"] path = validation/rotor-db - url = git@gitlab.uliege.be:thlamb/rotor-db.git + url = ../rotor-db.git [submodule "src/libs/matlab_airfoil_toolbox"] path = src/libs/matlab_airfoil_toolbox - url = git@gitlab.uliege.be:am-dept/matlab_airfoil_toolbox + url = ../../am-dept/matlab_airfoil_toolbox diff --git a/CHANGELOG.md b/CHANGELOG.md index 0effe60edd70cfb5ff19e33f33722b2df6b2cd58..f65bade195d50e7025325845e11f8511cdab5eb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,12 @@ _Initial commit_: single rotor in hover/axial flows ### Fixed +## [0.0.0] - 2022-11-27 + +_Initial commit_: single rotor in hover/axial flows + [sem_ver]:<https://semver.org/spec/v2.0.0.html> [keep_chglog]: <https://keepachangelog.com/en/1.0.0/> -[Unreleased]: https://gitlab.uliege.be/thlamb/rotare + +[Unreleased]: https://gitlab.uliege.be/thlamb/rotare/compare/0.0.0...main +[0.0.0]: https://gitlab.uliege.be/thlamb/rotare/releases/tag/0.0.0 diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000000000000000000000000000000000000..5a3660afff8c5e4b7af33b117c68a14c12eea5e1 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,12 @@ +## Download + +**WARNING**: Download the archive titled `COMPLETE CODE: rotare-<version>` +linked above, not the _source code_ ones. The latter are automatically generated +and do not contain all dependencies. + +## About this release + +_Initial commit_. + +- Single rotor in hover/axial flows +- NOT YET VALIDATED