diff --git a/.github/workflows/tests-workflow.yml b/.github/workflows/tests-workflow.yml deleted file mode 100644 index 70a9145..0000000 --- a/.github/workflows/tests-workflow.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: qdate tests and dialyzer -on: push - -jobs: - linux: - name: OTP ${{ matrix.otp_version }} - runs-on: ${{ matrix.os }} - continue-on-error: true - - strategy: - matrix: - include: - - os: ubuntu-22.04 - otp_version: '27.x' - rebar3_version: "3.24.0" - - os: ubuntu-22.04 - otp_version: '27.x' - rebar3_version: "3.23.0" - - os: ubuntu-22.04 - otp_version: '26.x' - rebar3_version: "3.22.1" - - os: ubuntu-22.04 - otp_version: '25.x' - rebar3_version: "3.22.1" - - os: ubuntu-22.04 - otp_version: '24.x' - rebar3_version: "3.22.1" - - os: ubuntu-20.04 - otp_version: '23.x' - rebar3_version: "3.19.0" - - steps: - - name: Install OTP ${{matrix.otp_version}} - uses: erlef/setup-beam@v1 - with: - version-type: loose - otp-version: ${{ matrix.otp_version}} - rebar3-version: ${{ matrix.rebar3_version}} - - - name: Checkout qdate - uses: actions/checkout@v4 - - - name: Run Tests - run: make test - - - name: Run Dialyzer - run: make dialyzer diff --git a/.gitignore b/.gitignore index 6ff84d8..253f03c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,3 @@ ebin/ .eunit/ .idea/ _build -doc/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5de773f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: erlang +script: "make test" +otp_release: + - 23.0 + - 22.3 + - 21.3 + - 20.3 +before_script: "sudo apt-get --yes --force-yes install libpam-runtime python-software-properties software-properties-common" diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown index f44c11c..f065053 100644 --- a/CHANGELOG.markdown +++ b/CHANGELOG.markdown @@ -1,18 +1,3 @@ -## 0.7.3 - -* Remove the `?else` macro. - -## 0.7.2 - -* Update the error message when qdate is not started with some better instructions. -* Some minor updates for hex.pm -* Removed the `erlnow()` warning -* Fix some typos in the documentation -* Update the makefile to use [rebar3.mk](https://rebar3.mk) -* Skipped 0.7.1 only because there was a partially tagged 0.7.1 for a while, - but was never published to hex. Just to ensure upgrades are easier, I just skipped - a proper 0.7.1 release - ## 0.7.0 * Re-introduce the qdate server for storing qdate timezones, formats, and parsers, diff --git a/Makefile b/Makefile index de4d762..5436322 100644 --- a/Makefile +++ b/Makefile @@ -15,12 +15,13 @@ compile: rebar3 update: rebar3 $(REBAR) update -test: - EUNIT=1 $(REBAR) compile - EUNIT=1 $(REBAR) eunit +test: compile + $(REBAR) eunit dialyzer: compile - DIALYZER=1 $(REBAR) dialyzer + $(REBAR) dialyzer + +travis: test dialyzer dev: mkdir -p _checkouts diff --git a/README.md b/README.md index a462a9b..f2c04ae 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # qdate - Erlang Date and Timezone Library -[![qdate tests and dialyzer](https://github.com/choptastic/qdate/actions/workflows/tests-workflow.yml/badge.svg)](https://github.com/choptastic/qdate/actions/workflows/tests-workflow.yml) +[![Build Status](https://travis-ci.org/choptastic/qdate.png?branch=master)](https://travis-ci.org/choptastic/qdate) ## Purpose diff --git a/rebar3 b/rebar3 new file mode 100755 index 0000000..6f0ccfa Binary files /dev/null and b/rebar3 differ diff --git a/src/qdate.erl b/src/qdate.erl index 7027b27..61f58b3 100644 --- a/src/qdate.erl +++ b/src/qdate.erl @@ -162,6 +162,7 @@ -define(DETERMINE_TZ, determine_timezone()). -define(DEFAULT_DISAMBIG, prefer_standard). +-define(else, true). start() -> @@ -1087,7 +1088,7 @@ date_tz_to_tz_both(Date, FromTZ, ToTZ) -> if Standard=:=Daylight -> Standard; - true -> + ?else -> {ambiguous, Standard, Daylight} end. @@ -1206,8 +1207,6 @@ flooring(N) when N < 0 -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TESTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --ifdef(EUNIT). - -include_lib("eunit/include/eunit.hrl"). %% emulates as if a forum-type website has a Site tz, and a user-specified tz @@ -1531,5 +1530,3 @@ microsoft_parser(_) -> stop_test(_) -> ok. - --endif.