diff --git a/.github/workflows/patch_updater.yml b/.github/workflows/patch_updater.yml index a16988399..428616492 100644 --- a/.github/workflows/patch_updater.yml +++ b/.github/workflows/patch_updater.yml @@ -6,6 +6,7 @@ on: env: TAG_COMMIT: 781ea3f.. + VERSION_FILE: VERSION.md BRANCH_NAME: patch_update jobs: @@ -28,10 +29,10 @@ jobs: - name: Insert Patch Count if: "!contains(steps.log.outputs.message, 'Updated Patch Count') && contains(steps.repo.outputs.message, 'lnis-uofu/OpenFPGA')" run: | - sed -i "/^set(OPENFPGA_VERSION_PATCH /s/[0-9]*)/`git log ${TAG_COMMIT} --oneline | wc -l`)/" CMakeLists.txt + sed -i "s/[0-9]*$/`git log ${TAG_COMMIT} --oneline | wc -l`/" ${VERSION_FILE} git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - git add CMakeLists.txt + git add ${VERSION_FILE} git commit -m "Updated Patch Count" - name: Push changes # push the output folder to your repo diff --git a/CMakeLists.txt b/CMakeLists.txt index 168795d87..0117721b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,9 +51,11 @@ set(VPR_USE_EZGL "auto" CACHE STRING "Specify whether vpr uses the graphics libr set_property(CACHE VPR_USE_EZGL PROPERTY STRINGS auto off on) # Version number -set(OPENFPGA_VERSION_MAJOR 1) -set(OPENFPGA_VERSION_MINOR 1) -set(OPENFPGA_VERSION_PATCH 215) +file (STRINGS "VERSION.md" VERSION_NUMBER) +string (REPLACE "." ";" VERSION_LIST ${VERSION_NUMBER}) +list(GET VERSION_LIST 0 OPENFPGA_VERSION_MAJOR) +list(GET VERSION_LIST 1 OPENFPGA_VERSION_MINOR) +list(GET VERSION_LIST 2 OPENFPGA_VERSION_PATCH) set(OPENFPGA_VERSION_PRERELEASE "dev") # Include user-defined functions diff --git a/VERSION.md b/VERSION.md new file mode 100644 index 000000000..c13847ae7 --- /dev/null +++ b/VERSION.md @@ -0,0 +1 @@ +1.1.215 diff --git a/docs/source/conf.py b/docs/source/conf.py index 03c1cdb47..02a4256b8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -37,10 +37,10 @@ copyright = u'2018, Xifan Tang' author = u'Xifan Tang' # The short X.Y version -version = u'' -# The full version, including alpha/beta/rc tags -release = u'1.0' - +with open("VERSION.md") as ver_f: + version = ver_f.readline().rstrip() + # The full version, including alpha/beta/rc tags + release = version # -- General configuration ---------------------------------------------------