Merge pull request #57 from acsaeed/embossc-shebang Generalize embossc shebang
diff --git a/.github/scripts/set_release_version.py b/.github/scripts/set_release_version.py new file mode 100644 index 0000000..980a852 --- /dev/null +++ b/.github/scripts/set_release_version.py
@@ -0,0 +1,7 @@ +# Obtains a date-based version for the release workflow. + +import datetime + +now_utc = datetime.datetime.now(datetime.timezone.utc) +version = now_utc.strftime('%Y.%m%d.%H%M%S') +print('::set-output name=version::v{}'.format(version))
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4477dee --- /dev/null +++ b/.github/workflows/release.yml
@@ -0,0 +1,33 @@ +--- +name: Release +on: + push: + branches: + - 'master' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: actions/setup-python@master + with: + python-version: '3.x' + - name: Set Release Version + id: set_release_version + run: python ./.github/scripts/set_release_version.py + - name: Create Archive Release + uses: thedoctor0/zip-release@master + with: + filename: 'emboss.zip' + exclusions: '*.git*' + - name: Automatic Release Upload + id: automatic_release + uses: 'marvinpinto/action-automatic-releases@latest' + with: + repo_token: '${{ secrets.GITHUB_TOKEN }}' + automatic_release_tag: ${{ steps.set_release_version.outputs.version }} + prerelease: false + title: ${{ steps.set_release_version.outputs.version }} + files: | + emboss.zip
diff --git a/compiler/back_end/cpp/testcode/uint_sizes_test.cc b/compiler/back_end/cpp/testcode/uint_sizes_test.cc index 3b0cab4..cf8a7dd 100644 --- a/compiler/back_end/cpp/testcode/uint_sizes_test.cc +++ b/compiler/back_end/cpp/testcode/uint_sizes_test.cc
@@ -360,7 +360,7 @@ } TEST(SizesWriter, CanWriteExplicitlySizedEnumSizes) { - ::std::uint8_t buffer[sizeof kExplicitlySizedEnumSizes]; + ::std::uint8_t buffer[sizeof kExplicitlySizedEnumSizes] = {0}; auto writer = ExplicitlySizedEnumSizesWriter(buffer, sizeof buffer); writer.one_byte().Write(ExplicitlySizedEnum::VALUE1); writer.two_byte().Write(ExplicitlySizedEnum::VALUE10);
diff --git a/runtime/cpp/emboss_text_util.h b/runtime/cpp/emboss_text_util.h index 59bdc4e..500d828 100644 --- a/runtime/cpp/emboss_text_util.h +++ b/runtime/cpp/emboss_text_util.h
@@ -67,7 +67,7 @@ return result; } - TextOutputOptions WithNumericBase(int new_value) const { + TextOutputOptions WithNumericBase(uint8_t new_value) const { TextOutputOptions result = *this; result.numeric_base_ = new_value; return result;