Commit Graph

16 Commits

Author SHA1 Message Date
Michael T Lombardi
b7e8a5bdba
(GH-608) Add getConventions and refactor
This commit introduces the getConventions function, which does a one-time calculation
for the changes in packaging conventions to propagate to the getArch and getOS
functions.

It updates those functions and the installer code to leverage the conventions.

Finally, it updates the test arrangement for getArch and getOS to use test cases
instead of repeating the same test over and over and adds unit tests for the new
getConventions function.
2022-10-13 23:13:33 -05:00
Michael T Lombardi
e70fd029fa
(GH-608) Fix package url for v0.102.0 & v0.103.0
Prior to this change, the URL building for versions of hugo was
deterministic as the URLs for the packages were set to a
project-specific standard. That URL creation began to fail for macOS in
[0.102.0] and for Windows in [0.103.0]. It does not fail for Linux
because the hugo releases for Linux continue to include the old package
naming as an alias.

This change:

- Updates the `get-os` function to take the hugo version as additional
  input, altering the return value based on the version.
- Updates the `get-arch` function to take the operating system name and
  hugo version as additional input, altering the return value based on
  both. Including the OS name is required for handling macOS.
- Fixes #608
- Fixes #605

[0.102.0]: https://github.com/gohugoio/hugo/releases/tag/v0.102.0
[0.103.0]: https://github.com/gohugoio/hugo/releases/tag/v0.103.0
2022-10-06 08:09:56 -05:00
Steve Teuber
6d30a88741
feat: Add support for different processor architectures (#518)
ARM, ARM64
2021-05-27 13:03:38 +09:00
Shohei Ueda
8bff475612
chore: change printWidth from 80 to 100 (#365) 2020-06-22 05:40:06 +09:00
yutopp
54af4c1320
fix: Wrap an entrypoint by async to handle exceptions correctly (#363)
* fix: add return type

Co-authored-by: Shohei Ueda <30958501+peaceiris@users.noreply.github.com>
2020-06-21 13:16:10 +09:00
Shohei Ueda
94853340b9
fix: action failure status (#151)
Close #149

* chore: fix path to .gitconfig
2020-01-25 12:42:32 +09:00
Shohei Ueda
b55f1c81fb
test: Add fail to fetch latest due to 404 (#137) 2020-01-21 01:35:00 +09:00
Shohei Ueda
283bc47636
refactor: main and installer (#133)
* refactor: installer
* test: Fix workDir cleanup
2020-01-18 12:07:13 +09:00
Shohei Ueda
442aa4dbd4
test: Add unit testing (get-latest-version) (#132) 2020-01-18 11:11:17 +09:00
Shohei Ueda
386980e22b
test: Add integration testing (#131)
* docs: Update description
* deps: Add nock
* chore: Add resolveJsonModule
* test: Add integration testing
* chore: Add @typescript-eslint/eslint-plugin
* refactor: Fix lint errors
* chore: Add eslint-plugin-jest
* refactor: Fix lint errors
* test: Add remove working files
* ci: Comment out cache steps
2020-01-18 10:29:06 +09:00
Shohei Ueda
4642226db0
refactor: Use node-fetch instead of xmlhttprequest (#130)
* deps: Add node-fetch, remove xmlhttprequest
* refactor: Use node-fetch instead of xmlhttprequest
2020-01-18 04:36:10 +09:00
Shohei Ueda
739a95f1e7
gha: Enhance workflows (#102)
* gha: Add Pull Request to stale target
* gha: Add ncc check step (Close #98 )
* src: Rename showVersion()
* test: Add not to be cases
* Remove old comment
* gha: Add update major tag workflow (Close #97 )
2019-12-08 15:45:59 +09:00
Shohei Ueda
ef869fb22f
Path join (#92) 2019-11-22 11:14:44 +09:00
Shohei Ueda
d7d48e3009
Refactor: enhance Hugo version dumping (#39) 2019-09-22 10:24:28 +09:00
Shohei Ueda
e194c83989
Refactor: remove Golang and Git dumping (#37)
* ci: setup lint-staged
* refactor: remove golang and git dumping
2019-09-22 08:13:23 +09:00
Shohei Ueda
dc8541739a
Feat: Support macOS and Windows, migrate JavaScript to TypeScript (#32)
- Support macOS and Windows (Close #24 )
- Refactoring
  - Error handling
  - TypeScript
- Prettier (Close #29 )
- GHA: Add upload-artifact step for test coverage
- deps: Install husky
2019-09-21 10:41:21 +09:00