Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
VERSION 0.6
FROM node:19.1.0-alpine3.15
RUN npm install -g vsce ovsx semver
WORKDIR /earthfile-syntax-highlighting
package:
COPY . ./
ARG VSCODE_RELEASE_TAG
RUN test -n "$VSCODE_RELEASE_TAG"
RUN VERSION=${VSCODE_RELEASE_TAG#v} ; \
sed -i 's^0.0.0^'"$VERSION"'^g' ./package.json
RUN vsce package
RUN VERSION=${VSCODE_RELEASE_TAG#v} ; \
mv ./earthfile-syntax-highlighting-$VERSION.vsix ./earthfile-syntax-highlighting-$VSCODE_RELEASE_TAG.vsix
SAVE ARTIFACT ./earthfile-syntax-highlighting-$VSCODE_RELEASE_TAG.vsix
release:
ARG VSCODE_RELEASE_TAG
RUN test -n "$VSCODE_RELEASE_TAG"
COPY --build-arg VSCODE_RELEASE_TAG="$VSCODE_RELEASE_TAG" +package/earthfile-syntax-highlighting-$VSCODE_RELEASE_TAG.vsix ./
RUN --secret VSCE_TOKEN=+secrets/earthly-technologies/vsce/token test -n "$VSCE_TOKEN"
RUN --secret OVSX_TOKEN=+secrets/earthly-technologies/ovsx/token test -n "$OVSX_TOKEN"
RUN --push \
--secret VSCE_TOKEN=+secrets/earthly-technologies/vsce/token \
vsce publish --pat "$VSCE_TOKEN" --packagePath ./earthfile-syntax-highlighting-$VSCODE_RELEASE_TAG.vsix
RUN --push \
--secret OVSX_TOKEN=+secrets/earthly-technologies/ovsx/token \
npx ovsx publish ./earthfile-syntax-highlighting-$VSCODE_RELEASE_TAG.vsix -p "$OVSX_TOKEN"
export:
COPY . ./
SAVE ARTIFACT ./