Commit fbab8609 authored by Dean Camera's avatar Dean Camera
Browse files

Add transform to update the VSIX extension version automatically when built.

parent 78e6e4f4
......@@ -8,8 +8,8 @@
<Description xml:space="preserve">LUFA USB Framework</Description>
<IsolatedShell Version="6.1">AtmelStudio</IsolatedShell>
LUFA Library
Copyright (C) Dean Camera, 2013.
dean [at] fourwalledcubicle [dot] com
<!-- Atmel Studio framework VSIX XML transform file -->
<!-- -->
<xsl:stylesheet xmlns:xsl="" xmlns:vs="" version="1.0">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<!-- Need to input the extension version for later use -->
<xsl:param name="extension-version"/>
<!-- Recursively match and copy/process all nodes/attributes -->
<xsl:template match="@*|node()">
<xsl:apply-templates select="@*|node()"/>
<!-- Update the extension version to the version of LUFA being used -->
<xsl:template match="vs:Version">
<xsl:value-of select="$extension-version"/>
......@@ -16,6 +16,7 @@ EXTENSION_OUTPUT_XML := $(LUFA_ROOT)/../extension.xml
XML_FILES := $(filter-out $(TEMP_MANIFEST_FILE), $(shell ls *.xml))
LUFA_VERSION_NUM := $(shell grep LUFA_VERSION_STRING $(LUFA_ROOT)/Version.h | cut -d'"' -f2)
EXT_VERSION_NUM := $(shell date +"%y.%m.%d").$(LUFA_VERSION_NUM)
all: check_filenames generate_xml generate_vsix
......@@ -45,10 +46,9 @@ generate_xml: $(TEMP_MANIFEST_XML)
@xsltproc XSLT/lufa_extension_transform.xslt $< | xsltproc XSLT/lufa_indent_transform.xslt - > $(EXTENSION_OUTPUT_XML)
@echo "Atmel Studio extension.xml file generated."
cp VSIX/* $(LUFA_ROOT)/../
cp "VSIX/[Content_Types].xml" $(LUFA_ROOT)/../
xsltproc --stringparam extension-version $(EXT_VERSION_NUM) XSLT/lufa_vsmanifest_transform.xslt VSIX/extension.vsixmanifest > $(LUFA_ROOT)/../extension.vsixmanifest
cd $(LUFA_ROOT)/../; zip LUFA_AS_Extension.vsix -r --exclude=*StudioIntegration* *
check_filenames: $(TEMP_MANIFEST_XML)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment