Skip to content

Action does not read .swift-version #23

Closed
@sidepelican

Description

@sidepelican

I expected to read .swift-version file when no options specified like belew

// in my steps
- uses: swiftwasm/setup-swiftwasm@v1

but .swift-version was not used. because

default: 'wasm-5.7.1-RELEASE'

default swift-version option exists and read it first.

setup-swiftwasm/index.js

Lines 48 to 59 in 8e7c319

const version = core.getInput('swift-version') || options.version;
if (version) {
core.debug(`Using version from input: ${version}`);
return version;
}
if (fs.existsSync(".swift-version")) {
const versionFile = fs.readFileSync('.swift-version', 'utf8').trim();
if (versionFile !== "") {
core.debug(`Using version from .swift-version file: ${versionFile}`);
return versionFile;
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions