Skip to content

Commit

Permalink
Restore uuid generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberbeni committed Nov 21, 2020
1 parent c2cac47 commit 96081a2
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 7 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Test linux rebuild criteria"

on:
workflow_dispatch:
schedule:
- cron: '16 6 * * *'

jobs:
test:
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: linux-rebuild-testing
- name: Get swiftlint with exact version
uses: ./
with:
url: https://github.com/realm/SwiftLint
branch: '0.41.0'
- name: Test swiftlint
run: |
echo "class Test {}" > ./test.swift
swiftlint lint ./test.swift
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions lib/helpers.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ export async function exec(commandLine: string, args?: string[]): Promise<string
}

export async function getUuid(url: string, commitHash: string): Promise<string> {
const platform = os.platform()
let additionalInfo: string
if (platform == 'darwin') {
if (os.platform() == 'darwin') {
additionalInfo = `macos-${os.arch()}`
} else {
const osVersion = await exec('uname', ['-v'])
const swiftVersion = await exec('swift', ['-version'])
additionalInfo = `${platform}-${os.arch()}-${swiftVersion}`
additionalInfo = `${osVersion}-${os.arch()}-${swiftVersion}`
}
return _uuid(`${url}-${commitHash}-${additionalInfo}`, '6050636b-7499-41d4-b9c6-756aff9856d0')
}
Expand Down

0 comments on commit 96081a2

Please sign in to comment.